public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, "(JC),
	Jayachandran" <j-rameshbabu@ti.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Chintan Vankar <c-vankar@ti.com>,
	Danish Anwar <danishanwar@ti.com>, Daolin Qiu <d-qiu@ti.com>,
	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 v2 2/2] af_packet: Add port specific handling for HSR
Date: Fri, 13 Mar 2026 17:04:10 +0100	[thread overview]
Message-ID: <20260313160410.LEhav8Xz@linutronix.de> (raw)
In-Reply-To: <20260313092226.SscHp2zQ@linutronix.de>

On 2026-03-13 10:22:28 [+0100], To Willem de Bruijn wrote:
> On 2026-03-12 17:43:36 [-0400], Willem de Bruijn wrote:
> > > Yes, this is RX. If I open packet socket, bind to hsr0, how do I filter
> > > for packets from one of the slaves?
> > 
> > I was thinking of attaching directly to the slave devices.
> 
> That could work. Let me see.

Halfway done. What we went down to is:

Send with header    -> eth0/ eth1 + SO_MARK for header + port 1/ 2
Send without header -> hsr0 + SO_MARK 1/2 port 1/ 2 
RX                  -> listen on eth0/ eth1

Now this compiles and I look into userland and am currently stuck with
the problem that it does not expect "two devices". It is not impossible
but…

> > > After some thinking and browsing through the packet code:
> > > The hsr stack creates hsrX. If it would create additionally hsrX_A and
> > > hsrX_B in order to be able to send and receive only on the relevant
> > > slave device then I wouldn't need the filters in packet code. That could
> > > work…
> > 
> > That's another option.
> 
> Okay. Let me add this as plan B then.

At this point I am considering this which would avoid having to use
hsr0+eth1 for one direction depending on whether I have to send with or
without the header. But this might lead to other problems such as ip
address and so on.
 
The suggested changes to af_packet, that remains a hard no?

Sebastian

  reply	other threads:[~2026-03-13 16:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 15:52 [PATCH RFC net-next v2 0/2] hsr: Add additional info to send/ receive skbs Sebastian Andrzej Siewior
2026-03-09 15:52 ` [PATCH RFC net-next v2 1/2] hsr: Allow to send a specific port and with HSR header Sebastian Andrzej Siewior
2026-03-09 15:52 ` [PATCH RFC net-next v2 2/2] af_packet: Add port specific handling for HSR Sebastian Andrzej Siewior
2026-03-10  1:38   ` Willem de Bruijn
2026-03-10 10:55     ` Sebastian Andrzej Siewior
2026-03-10 21:35       ` Willem de Bruijn
2026-03-12 15:42         ` Sebastian Andrzej Siewior
2026-03-12 21:43           ` Willem de Bruijn
2026-03-13  9:22             ` Sebastian Andrzej Siewior
2026-03-13 16:04               ` Sebastian Andrzej Siewior [this message]
2026-03-16 20:12                 ` Willem de Bruijn
2026-03-17 17:29                   ` Sebastian Andrzej Siewior
2026-03-19 13:29                     ` Willem de Bruijn
2026-03-19 14:26                       ` Sebastian Andrzej Siewior
2026-03-19 16:27                         ` Willem de Bruijn
2026-03-24 16:38                           ` 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=20260313160410.LEhav8Xz@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=c-vankar@ti.com \
    --cc=d-qiu@ti.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fmaurer@redhat.com \
    --cc=horms@kernel.org \
    --cc=j-rameshbabu@ti.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=willemdebruijn.kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox