From: Xie He <xie.he.0141@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Neil Horman <nhorman@tuxdriver.com>,
John Fastabend <john.fastabend@gmail.com>,
Jesper Dangaard Brouer <hawk@kernel.org>
Subject: Re: [PATCH net RFC] net: Clear IFF_TX_SKB_SHARING for all Ethernet devices using skb_padto
Date: Thu, 22 Oct 2020 19:25:40 -0700 [thread overview]
Message-ID: <CAJht_EMuVzRSp+OmKFY0nPnkC0a39k93KQAeaOFghLBy6TXgiQ@mail.gmail.com> (raw)
In-Reply-To: <CAJht_EOo50TxEUJmQMBBnaH4FW_2Afpcrr0pStFEXH1Bg3vteg@mail.gmail.com>
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.
next prev parent reply other threads:[~2020-10-23 2:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 7:28 [PATCH net RFC] net: Clear IFF_TX_SKB_SHARING for all Ethernet devices using skb_padto Xie He
2020-10-22 7:46 ` Xie He
2020-10-22 15:22 ` Jakub Kicinski
2020-10-22 19:59 ` Xie He
2020-10-23 0:44 ` Jakub Kicinski
2020-10-23 1:56 ` Xie He
2020-10-23 2:25 ` Xie He [this message]
2020-10-23 17:31 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJht_EMuVzRSp+OmKFY0nPnkC0a39k93KQAeaOFghLBy6TXgiQ@mail.gmail.com \
--to=xie.he.0141@gmail.com \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).