Re: [PATCH net-next V6 2/3] net/mlx5e: Avoid copying payload to the skb's linear part
From: Dragos Tatulea
Date: Thu May 14 2026 - 08:36:58 EST
On 12.05.26 18:30, Amery Hung wrote:
>> That would work, but maybe with one less conditional:
>>
>> if (!len)
>> __pskb_pull_tail(skb, min(headlen, skb->data_len);
>> else if (len < ETH_HLEN)
>> __pskb_pull_tail(skb, min(ETH_LEN - len, skb->data_len));
>>
>> Tariq suggested to make sure that we have an xdp selftest for this.
>> Will take it as a follow-up after this series.
>>
>
> Sounds good. Make sense.
>
Holding off the patch for a bit. I was curious how bad it would be to
always pull at most ETH_HLEN (as in the else case) and not to read the
headlen anymore. So far results are encouraging. This would simplify
the logic.
Thanks,
Dragos