From: Jakub Kicinski Date: Thu, 22 Jun 2017 01:25:10 +0000 (-0700) Subject: nfp: xdp: report if program is offloaded X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=149d7a572ae124385973bf1c8e4d80b3f07d8bd4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git nfp: xdp: report if program is offloaded Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index c9fc1df1823e..2134493ec8a8 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -3341,6 +3341,8 @@ static int nfp_net_xdp(struct net_device *netdev, struct netdev_xdp *xdp) xdp->extack); case XDP_QUERY_PROG: xdp->prog_attached = !!nn->xdp_prog; + if (nn->dp.bpf_offload_xdp) + xdp->prog_attached = XDP_ATTACHED_HW; xdp->prog_id = nn->xdp_prog ? nn->xdp_prog->aux->id : 0; return 0; default: