[dpdk-dev] [PATCH v8 05/12] bpf: add function to dump eBPF instructions
Stephen Hemminger
stephen at networkplumber.org
Wed Sep 15 18:26:16 CEST 2021
On Wed, 15 Sep 2021 11:04:41 +0000
"Ananyev, Konstantin" <konstantin.ananyev at intel.com> wrote:
> > diff --git a/lib/bpf/bpf_convert.c b/lib/bpf/bpf_convert.c
> > index a46ffeb067dd..db84add7dcce 100644
> > --- a/lib/bpf/bpf_convert.c
> > +++ b/lib/bpf/bpf_convert.c
> > @@ -331,7 +331,12 @@ static int bpf_convert_filter(const struct bpf_insn *prog, size_t len,
> > case BPF_LD | BPF_IND | BPF_H:
> > case BPF_LD | BPF_IND | BPF_B:
> > /* All arithmetic insns map as-is. */
> > - *insn = BPF_RAW_INSN(fp->code, BPF_REG_A, BPF_REG_X, 0, fp->k);
> > + insn->code = fp->code;
> > + insn->dst_reg = BPF_REG_A;
> > + bpf_src = BPF_SRC(fp->code);
> > + insn->src_reg = bpf_src == BPF_X ? BPF_REG_X : 0;
> > + insn->off = 0;
> > + insn->imm = fp->k;
> > break;
>
> Should it be part of that patch?
> Looks like belongs to previous one, no?
Yes, moved it in next bundle.
More information about the dev
mailing list