提交 149d7a57 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

nfp: xdp: report if program is offloaded

Make use of just added XDP_ATTACHED_HW.
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册