mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
nfp: set flags in the correct member of netdev_bpf
netdev_bpf.flags is the input member for installing the program.
netdev_bpf.prog_flags is the output member for querying. Set
the correct one on query.
Fixes: 92f0292b35
("net: xdp: report flags program was installed with on query")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
21567eded9
commit
4a29c0db69
1 changed files with 1 additions and 1 deletions
|
@ -3392,7 +3392,7 @@ static int nfp_net_xdp(struct net_device *netdev, struct netdev_bpf *xdp)
|
|||
if (nn->dp.bpf_offload_xdp)
|
||||
xdp->prog_attached = XDP_ATTACHED_HW;
|
||||
xdp->prog_id = nn->xdp_prog ? nn->xdp_prog->aux->id : 0;
|
||||
xdp->flags = nn->xdp_prog ? nn->xdp_flags : 0;
|
||||
xdp->prog_flags = nn->xdp_prog ? nn->xdp_flags : 0;
|
||||
return 0;
|
||||
case BPF_OFFLOAD_VERIFIER_PREP:
|
||||
return nfp_app_bpf_verifier_prep(nn->app, nn, xdp);
|
||||
|
|
Loading…
Reference in a new issue