]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
bpf: bnxt: Report bpf_prog ID during XDP_QUERY_PROG
authorMartin KaFai Lau <kafai@fb.com>
Fri, 16 Jun 2017 00:29:13 +0000 (17:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Jun 2017 15:58:36 +0000 (11:58 -0400)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c

index 8ce793a0d030ff713dc1800bb7c0efcb827bd031..7d67552e70d7af3a6ad254bf7bb164a159be9938 100644 (file)
@@ -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: