Subject: Re: [PATCH] net-xdp: netdev attribute to control xdpgeneric skb linearization

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Fri, 24 Jan 2020 22:27:58 +0100

Luigi Rizzo <[email-masked]> writes:

> On Fri, Jan 24, 2020 at 7:31 AM Toke Høiland-Jørgensen <[email-masked]> wrote:
>>
>> Luigi Rizzo <[email-masked]> writes:
>>
> ...
>> > My motivation for this change is that enforcing those guarantees has
>> > significant cost (even for native xdp in the cases I mentioned - mtu >
>> > 1 page, hw LRO, header split), and this is an interim solution to make
>> > generic skb usable without too much penalty.
>>
>> Sure, that part I understand; I just don't like that this "interim"
>> solution makes generic and native XDP diverge further in their
>> semantics...
>
> As a matter of fact I think it would make full sense to use the same approach
> to control whether native xdp should pay the price converting to linear buffers
> when the hw cannot guarantee that.
>
> To me this seems to be a case of "perfect is enemy of good":..

Hmm, I can kinda see your point (now that I've actually grok'ed how the
length works with skbs and generic XDP :)). I would still worry that
only having the header there would lead some XDP programs to just
silently fail. But on the other hand, this is opt-in... so IDK - maybe
this is fine to merge as-is, and leave improvements for later?

-Toke