Re: [PATCH v3 net-next] netdev attribute to control xdpgeneric skb linearization

From: Toke HÃiland-JÃrgensen
Date: Fri Feb 28 2020 - 05:16:45 EST


Luigi Rizzo <lrizzo@xxxxxxxxxx> writes:

> Add a netdevice flag to control skb linearization in generic xdp mode.
>
> The attribute can be modified through
> /sys/class/net/<DEVICE>/xdp_linearize
> The default is 1 (on)

Calling it just 'xdp_linearize' implies (to me) that it also affects
driver-mode XDP. So maybe generic_xdp_linearize ?

[...]

> +
> +What: /sys/class/net/<iface>/xdp_linearize
> +Date: Jan 2020
> +KernelVersion: 5.6
> +Contact: netdev@xxxxxxxxxxxxxxx
> +Description:
> + boolean controlling whether skb should be linearized in
> + generic xdp. Defaults to true.

Could you also add a few words explaining what the tradeoff here is?
Something like: "turning this off can increase the performance of
generic XDP at the cost of making the content of making the XDP program
unable to access packet fragments after the first one"

-Toke