public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Steve Williams <steve.williams@getcruise.com>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, vinicius.gomes@intel.com,
	xiaoliang.yang_1@nxp.com, Andrew Lunn <andrew@lunn.ch>
Subject: Re: [EXT] Re: [PATCH net-next] net/hanic: Add the hanic network interface for high availability links
Date: Wed, 23 Nov 2022 17:36:07 +0100	[thread overview]
Message-ID: <Y35L9ykSI37snvSw@nanopsycho> (raw)
In-Reply-To: <20221123152543.ekc5t7gp2hpmaaze@skbuf>

Wed, Nov 23, 2022 at 04:25:43PM CET, vladimir.oltean@nxp.com wrote:
>On Wed, Nov 23, 2022 at 03:52:17PM +0100, Jiri Pirko wrote:
>> >Reworded, why must the hanic functionality to be in the kernel?
>> 
>> I guess for the same reason other soft netdevice driver are in the
>> kernel. You can do bridge, bond, etc in a silimilar way you described
>> here...
>
>You have to consider the value added to the kernel in each case
>(and also what were the best practices when those other drivers were
>introduced; you can't just use bonding as a precedent for anything).
>
>I believe hanic does not even attempt to solve a generic enough problem
>to be the FRER endpoint driver for the Linux kernel. It assumes streams
>will be {MAC SA, VID} on RX, and {MAC DA, VID} on TX. That's already
>policy enforced by the kernel, when the kernel should just provide the
>mechanisms for user space to enforce one. This type of stream
>classification will not be the case for 802.1CB networks in general.
>According to some of my own research, you can also solve some of the
>problems Steve is addressing in other ways.
>
>For example, in order to make {MAC DA, VLAN} streams identify both the
>sender and the receiver, one can arrange that in a network, each sender
>has its own VLAN ID which identifies it as a sender. I know of at least
>one network where this is the case. But this would also be considered
>policy, and I'm not suggesting that hanic should use this approach
>rather than the other. 802.1CB simply does not recommend one mode of
>arranging streams over another.
>
>The fact that hanic needs 802.1Q uppers as termination points for
>{MAC, VLAN} addresses seemst to simply not scale for IP-based streams,
>or generic byte@offset pattern matching based streams.

Vlan implementation could be easily done internally in hanic driver if
needed, similar to bridge and openvswitch vlan implementations.


>
>Additionally, the hanic driver will probably need a rewrite when Steve
>enables some options like CONFIG_PROVE_LOCKING or CONFIG_DEBUG_ATOMIC_SLEEP.

Well, there are lots of other issues in the driver as it is right now.
I don't think it is worth to discuss it now.


>It currently creates sysfs files for streams from the NET_TX softirq.
>It's not even clear to me that stream auto-discovery is something
>desirable generally. I'd rather pre-program my termination streams if
>I know what I'm doing, rather than let the kernel blindly trust possibly
>maliciously crafted 802.1CB tags.
>
>When I suggested a tap based solution, I was trying to take the Cruise

tap is slow. That is I guess the reason for kernel implementation.


>hanic driver, as presented, at face value and to propose something which
>seems like a better fit for it. I wasn't necessarily trying to transform
>the hanic driver into something useful in general for the kernel, since
>I don't know if that's what Steve's goal is.

Or, you can always implement this as a BPF program :)

  reply	other threads:[~2022-11-23 16:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 23:26 [PATCH net-next] net/hanic: Add the hanic network interface for high availability links Steve Williams
2022-11-22  0:40 ` Andrew Lunn
2022-11-22  3:58 ` Jakub Kicinski
2022-11-22 11:34   ` Vladimir Oltean
2022-11-22 19:54     ` Andrew Lunn
2022-11-22 21:01       ` [EXT] " Steve Williams
2022-11-22 20:51     ` Steve Williams
2022-11-23 14:26       ` Vladimir Oltean
2022-11-23 14:52         ` Jiri Pirko
2022-11-23 15:12           ` Andrew Lunn
2023-02-21 11:03             ` Ferenc Fejes
2022-11-23 15:25           ` Vladimir Oltean
2022-11-23 16:36             ` Jiri Pirko [this message]
2022-11-29 22:38               ` Steve Williams
2022-11-22 12:49 ` Jiri Pirko
2022-11-22 13:55   ` Vladimir Oltean
2022-11-22 14:06     ` Jiri Pirko
2022-11-22 20:57     ` [EXT] " Steve Williams
2022-11-23 12:46       ` Jiri Pirko
2023-02-21 10:56 ` Ferenc Fejes

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=Y35L9ykSI37snvSw@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=andrew@lunn.ch \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steve.williams@getcruise.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.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