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

From: Luigi Rizzo
Date: Fri Feb 28 2020 - 05:56:18 EST


On Fri, Feb 28, 2020 at 2:16 AM Toke HÃiland-JÃrgensen <toke@xxxxxxxxxx> wrote:
>
> 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 ?

done in v4, xdpgeneric_linearize for consistency

...

> > +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"

done too in v4

thanks
luigi