]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bpf: qede: Report bpf_prog ID during XDP_QUERY_PROG
authorMartin KaFai Lau <kafai@fb.com>
Fri, 16 Jun 2017 00:29:17 +0000 (17:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Jun 2017 15:58:37 +0000 (11:58 -0400)
Add support to qede to report bpf_prog ID during XDP_QUERY_PROG.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Cc: Mintz Yuval <Yuval.Mintz@cavium.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/qlogic/qede/qede_filter.c

index 13955a3bd3b36abee318569cd2089e5a14803c5f..f939db5bac5fc4132687fdb664388a7be38a05ee 100644 (file)
@@ -1037,6 +1037,7 @@ int qede_xdp(struct net_device *dev, struct netdev_xdp *xdp)
                return qede_xdp_set(edev, xdp->prog);
        case XDP_QUERY_PROG:
                xdp->prog_attached = !!edev->xdp_prog;
+               xdp->prog_id = edev->xdp_prog ? edev->xdp_prog->aux->id : 0;
                return 0;
        default:
                return -EINVAL;