On Tue, 19 Feb 2019 17:18:30 +0100
Daniel Borkmann <dan...@iogearbox.net> wrote:

> Untested / uncompiled, but should be:
> 
>         case offsetof(struct __sk_buff, queue_mapping):
>                 if (type == BPF_WRITE) {
>                         *insn++ = BPF_JMP_IMM(BPF_JGE, si->src_reg, 
> NO_QUEUE_MAPPING, 1);
>                         *insn++ = BPF_STX_MEM(BPF_H, si->dst_reg, si->src_reg,
>                                               bpf_target_off(struct sk_buff, 
> queue_mapping, 2,
>                                                              target_size));
>                 } else {
>                         *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg,
>                                               bpf_target_off(struct sk_buff, 
> queue_mapping, 2,
>                                                              target_size));
>                 }
>                 break;

In-cooperated in V2 and tested.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Reply via email to