diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-06-16 02:29:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-16 17:58:36 +0200 |
commit | 8902965f8cb23bba8aa7f3be293ec2f3067b82c6 (patch) | |
tree | 0eb3acff9fa464e0d884899940e6048661b10fde /drivers | |
parent | bpf: virtio_net: Report bpf_prog ID during XDP_QUERY_PROG (diff) | |
download | linux-8902965f8cb23bba8aa7f3be293ec2f3067b82c6.tar.xz linux-8902965f8cb23bba8aa7f3be293ec2f3067b82c6.zip |
bpf: bnxt: Report bpf_prog ID during XDP_QUERY_PROG
Add support to bnxt to report bpf_prog ID during XDP_QUERY_PROG.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c index 8ce793a0d030..7d67552e70d7 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c @@ -218,6 +218,7 @@ int bnxt_xdp(struct net_device *dev, struct netdev_xdp *xdp) break; case XDP_QUERY_PROG: xdp->prog_attached = !!bp->xdp_prog; + xdp->prog_id = bp->xdp_prog ? bp->xdp_prog->aux->id : 0; rc = 0; break; default: |