From: Martin KaFai Lau Date: Fri, 16 Jun 2017 00:29:15 +0000 (-0700) Subject: bpf: ixgbe: Report bpf_prog ID during XDP_QUERY_PROG X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4792093edd032a1bc8ab6cac8abd877bbd8c53b2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git bpf: ixgbe: Report bpf_prog ID during XDP_QUERY_PROG Add support to ixgbe to report bpf_prog ID during XDP_QUERY_PROG. Signed-off-by: Martin KaFai Lau Cc: Alexander Duyck Cc: John Fastabend Acked-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index f3dc5dea9300..f1dbdf26d8e1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -9815,6 +9815,8 @@ static int ixgbe_xdp(struct net_device *dev, struct netdev_xdp *xdp) return ixgbe_xdp_setup(dev, xdp->prog); case XDP_QUERY_PROG: xdp->prog_attached = !!(adapter->xdp_prog); + xdp->prog_id = adapter->xdp_prog ? + adapter->xdp_prog->aux->id : 0; return 0; default: return -EINVAL;