lkml.org 
[lkml]   [2020]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net RFC] net: Clear IFF_TX_SKB_SHARING for all Ethernet devices using skb_padto
On Thu, Oct 22, 2020 at 6:56 PM Xie He <xie.he.0141@gmail.com> wrote:
>
> My patch isn't complete. Because there are so many drivers with this
> problem, I feel it's hard to solve them all at once. So I only grepped
> "skb_padto" under "drivers/net/ethernet". There are other drivers
> under "ethernet" using "skb_pad", "skb_put_padto" or "eth_skb_pad".
> There are also (fake) Ethernet drivers under "drivers/net/wireless". I
> feel it'd take a long time and also be error-prone to solve them all,
> so I feel it'd be the best if there are other solutions.

BTW, I also see some Ethernet drivers calling skb_push to prepend
strange headers to the skbs. For example,

drivers/net/ethernet/mellanox/mlxsw/switchx2.c prepends a header of
MLXSW_TXHDR_LEN (16).

We can't send shared skbs to these drivers either because they modify the skbs.

It seems to me that many drivers have always assumed that they can
modify the skb whenever needed. They've never considered there might
be shared skbs. I guess adding IFF_TX_SKB_SHARING to ether_setup was a
bad idea. It not only made the code less clean, but also didn't agree
with the actual situations of the drivers.

\
 
 \ /
  Last update: 2020-10-23 04:25    [W:0.349 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site