mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 15:41:58 +00:00
bpf: nfp: Report bpf_prog ID during XDP_QUERY_PROG
Add support to nfp to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Cc: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Alexei Starovoitov <ast@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4792093edd
commit
c330182479
@ -3256,6 +3256,7 @@ static int nfp_net_xdp(struct net_device *netdev, struct netdev_xdp *xdp)
|
||||
return nfp_net_xdp_setup(nn, xdp);
|
||||
case XDP_QUERY_PROG:
|
||||
xdp->prog_attached = !!nn->dp.xdp_prog;
|
||||
xdp->prog_id = nn->dp.xdp_prog ? nn->dp.xdp_prog->aux->id : 0;
|
||||
return 0;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user