nfp: xdp: report if program is offloaded
Make use of just added XDP_ATTACHED_HW. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ce158e580a
commit
149d7a572a
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue