All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org,  Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S . Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	 Felix Maurer <fmaurer@redhat.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	 Richard Cochran <richardcochran@gmail.com>,
	 Simon Horman <horms@kernel.org>
Subject: Re: [PATCH RFC net-next 1/2] hsr: Allow to send a specific port and with HSR header
Date: Wed, 04 Mar 2026 10:56:16 -0500	[thread overview]
Message-ID: <willemdebruijn.kernel.1d699189fce58@gmail.com> (raw)
In-Reply-To: <20260304145821.TQhzhhjF@linutronix.de>

Sebastian Andrzej Siewior wrote:
> On 2026-02-04 12:30:47 [-0500], Willem de Bruijn wrote:
> > > --- a/include/linux/skbuff.h
> > > +++ b/include/linux/skbuff.h
> > > @@ -605,6 +605,7 @@ struct skb_shared_info {
> > >  	};
> > >  	unsigned int	gso_type;
> > >  	u32		tskey;
> > > +	u32		hsr_ptp;
> > 
> > skb_shared_info cannot easily be expanded.
> > 
> > This is too specific a use-case to warrant fields in every packet.
> > 
> > I'm not super familiar with High-availability Seamless Redundancy
> > (HSR). Perhaps you can use either an skb_extension. Or the skb->cb[]
> > field if this data is only needed within the HSR protocol logic, so
> > can be assured to not be overwritten by other users of the control
> > block.
> 
> skb->cb does not work because I need share it between the HSR stack
> and AF_PACKET so it gets overwritten (as it is no meant to be shared
> between layers).
> I need actually three bits: HAVE_HEADER and PORT_NUMBER which 0-2.
> Would it work if I add a :1 and :2 member to struct sk_buff into the
> header group after unreadable? In my config there is a 6bit + 1 byte
> hole. Worst case (all ifdefs enabled) it sums to 30 bits so I would have
> just 2 left. Exceeding it by one bit in this case would extend create a
> 7bit + 1 byte hole and shift shifts tc_index + alloc_cpu. However there
> is a two byte hole between alloc_cpu before csum which is removed then.
> 
> Would it be okay if I occupy three bits in sk_buff which look unused?

Have you looked into using skb_extensions?

  reply	other threads:[~2026-03-04 15:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 11:24 [PATCH RFC net-next 0/2] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
2026-02-04 11:24 ` [PATCH RFC net-next 1/2] hsr: Allow to send a specific port and with HSR header Sebastian Andrzej Siewior
2026-02-04 17:30   ` Willem de Bruijn
2026-02-17 15:36     ` Sebastian Andrzej Siewior
2026-03-04 14:58     ` Sebastian Andrzej Siewior
2026-03-04 15:56       ` Willem de Bruijn [this message]
2026-03-04 16:12         ` Sebastian Andrzej Siewior
2026-03-04 23:48           ` Willem de Bruijn
2026-03-05  8:07             ` Sebastian Andrzej Siewior
2026-03-05 14:41               ` Jakub Kicinski
2026-03-05 15:05                 ` Sebastian Andrzej Siewior
2026-02-04 11:24 ` [PATCH RFC net-next 2/2] af_packet: Add port specific handling for HSR Sebastian Andrzej Siewior
2026-02-04 17:36   ` Willem de Bruijn
2026-02-17 15:51     ` Sebastian Andrzej Siewior
2026-02-16 16:10 ` [PATCH RFC net-next 0/2] hsr: Add additional info to send/ receive skbs Felix Maurer
2026-02-16 16:19   ` Sebastian Andrzej Siewior
2026-02-16 16:25   ` Andrew Lunn
2026-02-17 16:14     ` Sebastian Andrzej Siewior
2026-02-17 16:10   ` Sebastian Andrzej Siewior
2026-02-18 19:28     ` Felix Maurer
2026-02-18 21:53       ` Willem de Bruijn
2026-02-24 11:48         ` Sebastian Andrzej Siewior
2026-02-24 11:24       ` Sebastian Andrzej Siewior

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=willemdebruijn.kernel.1d699189fce58@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fmaurer@redhat.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.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.