Thread (8 messages) flat view 8 messages, 4 authors, 7d ago

Re: [PATCH RFC net-next] net: Use fixed slots for skb extensions

From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: 2026-08-27 08:34:20

On 27.08.26 09:42, Paolo Abeni wrote:
On 8/26/26 11:02 PM, Florian Westphal wrote:
quoted
Jakub Sitnicki [off-list ref] wrote:
Still WRT optimizing skb_ext size, I think that it should be feasible to
optimize the layout proposed by Florian by taking in account that some
exts are 'mutually exclusive' i.e. on top of my head mptcp and bridge
should never be attached to the same skb, and I *guess* can_skb_ext is
mutually exclusive with most of the others.
I would say with *all* of the others. CAN skbs only interact with 
ARPHDR_CAN netdevs containing a special ml_priv reference. And 
routing/forwarding is done by a CAN specific net/can/gw.c code.

The only code outside net/can that looks into CAN skbs is:
em_canid.c  Ematch rule to match CAN frames according to their CAN IDs

But I think this is not even relevant for CONFIG_NET_TC_SKB_EXT.
The layout could be adapted to such constraints, and there could be
run-time checks (under DEBUG_NET) to verify such constrains at skb_add
time leveraging `present_extensions` and a static matrix describing the
mutual exclusive status for all extensions.
+1

Best regards,
Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help