Commit 149d7a57 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

nfp: xdp: report if program is offloaded

Make use of just added XDP_ATTACHED_HW.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce158e58
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment