public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next 0/6] move CAN skb headroom content to skb extensions
@ 2026-01-25 20:15 Oliver Hartkopp
  2026-01-25 20:15 ` [net-next 1/6] can: use skb hash instead of private variable in headroom Oliver Hartkopp
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Oliver Hartkopp @ 2026-01-25 20:15 UTC (permalink / raw)
  To: netdev, linux-can; +Cc: Oliver Hartkopp

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/

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 | 123 ++++++++++++++++++++++++--------------
 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, 248 insertions(+), 141 deletions(-)
 create mode 100644 include/net/can.h

-- 
2.47.3


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-01-29  8:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-25 20:15 [net-next 0/6] move CAN skb headroom content to skb extensions Oliver Hartkopp
2026-01-25 20:15 ` [net-next 1/6] can: use skb hash instead of private variable in headroom Oliver Hartkopp
2026-01-28  1:45   ` Jakub Kicinski
2026-01-25 20:15 ` [net-next 2/6] can: add CAN skb extension infrastructure Oliver Hartkopp
2026-01-25 20:15 ` [net-next 3/6] can: move ifindex to CAN skb extensions Oliver Hartkopp
2026-01-25 20:15 ` [net-next 4/6] can: move frame_len " Oliver Hartkopp
2026-01-25 20:16 ` [net-next 5/6] can: remove private CAN skb headroom infrastructure Oliver Hartkopp
2026-01-28  1:49 ` [net-next 0/6] move CAN skb headroom content to skb extensions Jakub Kicinski
2026-01-28  8:42   ` Oliver Hartkopp
2026-01-28  9:07     ` Marc Kleine-Budde
2026-01-28 10:04       ` Marc Kleine-Budde
2026-01-28 10:17         ` Oliver Hartkopp
2026-01-29  6:44       ` Marc Kleine-Budde
2026-01-29  7:49         ` Oliver Hartkopp
2026-01-29  8:42           ` Marc Kleine-Budde
2026-01-28 11:35   ` Florian Westphal
2026-01-28 12:52     ` Oliver Hartkopp
2026-01-28 13:18       ` Florian Westphal
2026-01-28 16:14         ` Oliver Hartkopp
2026-01-28 16:25           ` Florian Westphal
2026-01-28 16:34             ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox