From: Xie He <xie.he.0...@gmail.com>
Date: Sat,  3 Oct 2020 17:46:19 -0700

> The purpose of these skb->len checks in these drivers is to ensure that
> there is a header in the skb available to be read and pulled.
> 
> However, we already have the pskb_may_pull function for this purpose.
> 
> The pskb_may_pull function also correctly handles non-linear skbs.
> 
> (Also delete the word "check" in the comments because pskb_may_pull may
> do things other than simple checks in the case of non-linear skbs.)
> 
> Cc: Willem de Bruijn <willemdebruijn.ker...@gmail.com>
> Cc: Martin Schiller <m...@dev.tdt.de>
> Signed-off-by: Xie He <xie.he.0...@gmail.com>

This is excessive.

On transmit the header will be in the linear area, especially
if it is only one byte in size.

You're adding a lot of extra checks, function calls, etc. which are
frankly unnecessary.

I'm not applying this unless you can prove that a non-linear single
header byte is possible in these code paths.  And you'll need to add
such proof to your commit message.

Thank you.

Reply via email to