Subject: Re: [RFC net-next] ethtool: provide XDP information with XDP_FEATURES_GET

From: Lorenzo Bianconi <[email-masked]>
Date: Mon, 6 Mar 2023 19:32:02 +0100

> On Mon,  6 Mar 2023 11:26:10 +0100 Lorenzo Bianconi wrote:
> > Implement XDP_FEATURES_GET request to get network device information
> > about supported xdp functionalities through ethtool.
> 
> You need to explain why. This is duplicating uAPI.

Hi Jakub,

So far the only way to dump the XDP features supported by the NIC is through
libbpf running bpf_xdp_query(). I would say it is handy for a sysadmin to
examine the XDP NIC capabilities in a similar way he/she is currently doing
for the hw offload capabilities. Something like (I have an ethtool user-space
patch not posted yet):

$ethtool --get-xdp-features eth0
XDP features for eth0:
xdp-basic: supported
xdp-redirect: supported
xdp-ndo-xmit: supported
xdp-xsk-zerocopy: not-supported
xdp-hw-offload: not-supported
xdp-rx-sg: not-supported
xdp-ndo-xmit-sg: not-supported

Regards,
Lorenzo