From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Robin van der Gracht <robin@protonic.nl>,
Oleksij Rempel <o.rempel@pengutronix.de>,
kernel@pengutronix.de, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH can-next v2 0/6] move CAN skb headroom content to skb extensions
Date: Wed, 28 Jan 2026 10:28:52 +0100 [thread overview]
Message-ID: <20260128-can-skb-ext-v2-0-fe64aa152c8a@pengutronix.de> (raw)
CAN bus related skbuffs (ETH_P_CAN/ETH_P_CANFD/ETH_P_CANXL) simply contain
CAN frame structs for CAN CC/FD/XL of skb->len length at skb->data. Those
CAN skbs do not have network/mac/transport headers nor other such
references for encapsulated protocols like ethernet/IP protocols.
To store data for CAN specific use-cases all CAN bus related skbuffs are
created with a 16 byte private skb headroom (struct can_skb_priv). Using
the skb headroom and accessing skb->head for this private data led to
several problems in the past likely due to "The struct can_skb_priv
business is highly unconventional for the networking stack." [1]
This patch set aims to remove the unconventional skb headroom usage for CAN
bus related skbuffs and use the common skb extensions instead.
[1] https://lore.kernel.org/linux-can/20260104074222.29e660ac@kernel.org/
---
Changes in v2:
- Patch#1: use u32 instead of __u32 for "struct uniqframe::hash"
- Patch#3: use u{8,16} instead of __u{8,16} for "struct can_skb_ext"
- Patch#6: add missing patch
- Link to v1: https://patch.msgid.link/20260125201601.5018-1-socketcan@hartkopp.net
---
Oliver Hartkopp (6):
can: use skb hash instead of private variable in headroom
can: add CAN skb extension infrastructure
can: move ifindex to CAN skb extensions
can: move frame_len to CAN skb extensions
can: remove private CAN skb headroom infrastructure
can: gw: use can_gw_hops instead of sk_buff::csum_start
MAINTAINERS | 1 +
drivers/net/can/dev/skb.c | 121 +++++++++++++++++++++++++++++-----------------
include/linux/can/core.h | 1 +
include/linux/can/skb.h | 32 ++----------
include/linux/skbuff.h | 3 ++
include/net/can.h | 28 +++++++++++
net/can/Kconfig | 1 +
net/can/af_can.c | 23 ++++++---
net/can/bcm.c | 26 +++++++---
net/can/gw.c | 38 ++++++++-------
net/can/isotp.c | 45 +++++++++++------
net/can/j1939/socket.c | 15 ++++--
net/can/j1939/transport.c | 28 +++++++----
net/can/raw.c | 21 +++++---
net/core/skbuff.c | 4 ++
15 files changed, 247 insertions(+), 140 deletions(-)
---
base-commit: 239f09e258b906deced5c2a7c1ac8aed301b558b
change-id: 20260128-can-skb-ext-17a4f132ce97
Best regards,
--
Marc Kleine-Budde <mkl@pengutronix.de>
next reply other threads:[~2026-01-28 9:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 9:28 Marc Kleine-Budde [this message]
2026-01-28 9:28 ` [PATCH can-next v2 1/6] can: use skb hash instead of private variable in headroom Marc Kleine-Budde
2026-01-28 9:28 ` [PATCH can-next v2 2/6] can: add CAN skb extension infrastructure Marc Kleine-Budde
2026-01-28 9:28 ` [PATCH can-next v2 3/6] can: move ifindex to CAN skb extensions Marc Kleine-Budde
2026-01-28 9:28 ` [PATCH can-next v2 4/6] can: move frame_len " Marc Kleine-Budde
2026-01-28 9:28 ` [PATCH can-next v2 5/6] can: remove private CAN skb headroom infrastructure Marc Kleine-Budde
2026-01-28 9:28 ` [PATCH can-next v2 6/6] can: gw: use can_gw_hops instead of sk_buff::csum_start Marc Kleine-Budde
2026-01-28 16:12 ` [can-next,v2,6/6] " Jakub Kicinski
2026-01-28 16:24 ` Oliver Hartkopp
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=20260128-can-skb-ext-v2-0-fe64aa152c8a@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robin@protonic.nl \
--cc=socketcan@hartkopp.net \
/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
all inboxes | Powered by JetHome®