From: Kurt Kanzenbach <kurt@linutronix.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Alexander Lobakin <alobakin@pm.me>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Eric Dumazet <edumazet@google.com>,
Paul Blakey <paulb@nvidia.com>,
Yoshiki Komachi <komachi.yoshiki@gmail.com>,
zhang kai <zhangkaiheb@126.com>,
Juhee Kang <claudiajkang@gmail.com>,
Andreas Oetken <ennoerlangen@gmail.com>,
George McCollister <george.mccollister@gmail.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
netdev@vger.kernel.org,
Anthony Harivel <anthony.harivel@linutronix.de>
Subject: Re: [PATCH net-next v1] flow_dissector: Add support for HSR
Date: Thu, 03 Mar 2022 09:08:35 +0100 [thread overview]
Message-ID: <87ilsva264.fsf@kurt> (raw)
In-Reply-To: <20220302224425.410e1f15@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
Hi Jakub,
On Wed Mar 02 2022, Jakub Kicinski wrote:
> On Mon, 28 Feb 2022 20:58:56 +0100 Kurt Kanzenbach wrote:
>> Network drivers such as igb or igc call eth_get_headlen() to determine the
>> header length for their to be constructed skbs in receive path.
>>
>> When running HSR on top of these drivers, it results in triggering BUG_ON() in
>> skb_pull(). The reason is the skb headlen is not sufficient for HSR to work
>> correctly. skb_pull() notices that.
>
> Should that also be fixed? BUG_ON() seems pretty drastic.
It's this statement here:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/include/linux/skbuff.h#n2483
I tried to look up, why is this a BUG_ON() in Thomas' history tree
[1]. Couldn't find an explanation. It's been introduced by this commit:
|commit 1a0153507ffae9cf3350e76c12d441788c0191e1 (HEAD)
|Author: Linus Torvalds <torvalds@athlon.transmeta.com>
|Date: Mon Feb 4 18:11:38 2002 -0800
|
| v2.4.3.2 -> v2.4.3.3
|
| - Hui-Fen Hsu: sis900 driver update
| - NIIBE Yutaka: Super-H update
| - Alan Cox: more resyncs (ARM down, but more to go)
| - David Miller: network zerocopy, Sparc sync, qlogic,FC fix, etc.
| - David Miller/me: get rid of various drivers hacks to do mmap
| alignment behind the back of the VM layer. Create a real
| protocol for it.
It seems like BUG/BUG_ON() is the error handling practice in case of
unavailable memory. Even though most functions such as skb_push() or
skb_put() use asserts or skb_over_panic() which also result in BUG() at
the end.
Thanks,
Kurt
[1] - https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2022-03-03 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 19:58 [PATCH net-next v1] flow_dissector: Add support for HSR Kurt Kanzenbach
2022-03-03 6:44 ` Jakub Kicinski
2022-03-03 8:08 ` Kurt Kanzenbach [this message]
2022-03-03 15:31 ` Jakub Kicinski
2022-03-03 15:48 ` Kurt Kanzenbach
2022-03-03 7:00 ` patchwork-bot+netdevbpf
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=87ilsva264.fsf@kurt \
--to=kurt@linutronix.de \
--cc=alobakin@pm.me \
--cc=anthony.harivel@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=claudiajkang@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ennoerlangen@gmail.com \
--cc=george.mccollister@gmail.com \
--cc=gustavoars@kernel.org \
--cc=komachi.yoshiki@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulb@nvidia.com \
--cc=vladimir.oltean@nxp.com \
--cc=zhangkaiheb@126.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.