linux/include
Oliver Hartkopp 96ea3a1e2d can: add CAN skb extension infrastructure
To remove the private CAN bus skb headroom infrastructure 8 bytes need to
be stored in the skb. The skb extensions are a common pattern and an easy
and efficient way to hold private data travelling along with the skb. We
only need the skb_ext_add() and skb_ext_find() functions to allocate and
access CAN specific content as the skb helpers to copy/clone/free skbs
automatically take care of skb extensions and their final removal.

This patch introduces the complete CAN skb extensions infrastructure:
- add struct can_skb_ext in new file include/net/can.h
- add include/net/can.h in MAINTAINERS
- add SKB_EXT_CAN to skbuff.c and skbuff.h
- select SKB_EXTENSIONS in Kconfig when CONFIG_CAN is enabled
- check for existing CAN skb extensions in can_rcv() in af_can.c
- add CAN skb extensions allocation at every skb_alloc() location
- duplicate the skb extensions if cloning outgoing skbs (framelen/gw_hops)
- introduce can_skb_ext_add() and can_skb_ext_find() helpers

The patch also corrects an indention issue in the original code from 2018:
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602010426.PnGrYAk3-lkp@intel.com/
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20260201-can_skb_ext-v8-2-3635d790fe8b@hartkopp.net
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-02-05 11:58:39 +01:00
..
acpi ACPI: PCI: IRQ: Fix INTx GSIs signedness 2026-01-05 19:06:40 +01:00
asm-generic mm/hugetlb: fix excessive IPI broadcasts when unsharing PMD tables using mmu_gather 2026-01-20 09:34:26 -08:00
clocksource
crypto lib/crypto: sha1: Remove low-level functions from API 2026-01-27 15:47:41 -08:00
cxl
drm drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE 2026-01-22 10:41:18 +01:00
dt-bindings Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-01-22 20:14:36 -08:00
hyperv mshv: add definitions for arm64 gpa intercepts 2026-01-15 07:28:58 +00:00
keys
kunit kunit: Enforce task execution in {soft,hard}irq contexts 2025-12-22 12:20:08 -08:00
kvm
linux can: add CAN skb extension infrastructure 2026-02-05 11:58:39 +01:00
math-emu
media
memory
misc
net can: add CAN skb extension infrastructure 2026-02-05 11:58:39 +01:00
pcmcia
ras Significant patch series in this merge are as follows: 2025-12-05 13:52:43 -08:00
rdma
rv rv: Fix compilation if !CONFIG_RV_REACTORS 2025-12-02 12:33:37 -05:00
scsi scsi: core: Fix error handler encryption support 2026-01-04 15:16:20 -05:00
soc This pull request is entirely SoC clk drivers, not for lack of trying to modify 2025-12-08 09:38:52 +09:00
sound ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer 2026-01-08 08:07:54 +01:00
target
trace trace: mptcp: add mptcp_rcvbuf_grow tracepoint 2026-02-04 18:45:09 -08:00
uapi Some more changes, including pulls from drivers: 2026-02-04 20:31:05 -08:00
ufs
vdso
video
xen
Kbuild