public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: "Clément Léger" <clement.leger@bootlin.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Simon Horman" <horms@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Russell King" <linux@armlinux.org.uk>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	linux-renesas-soc@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH net-next 02/11] net: dsa: tag_rzn1_a5psw: Add RZ/T2H ETHSW tag protocol and register ethsw tag driver
Date: Fri, 21 Nov 2025 22:48:33 +0200	[thread overview]
Message-ID: <20251121204833.hu4jfq6bx2kdamd3@skbuf> (raw)
In-Reply-To: <CA+V-a8vyjt43TPUmu+1TFHFvQsBwYTzKFSQOQm=O3R0dpZWG_w@mail.gmail.com>

On Fri, Nov 21, 2025 at 08:29:04PM +0000, Lad, Prabhakar wrote:
> On Fri, Nov 21, 2025 at 7:27 PM Vladimir Oltean <olteanv@gmail.com> wrote:
> >
> > On Fri, Nov 21, 2025 at 11:35:28AM +0000, Prabhakar wrote:
> > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > >
> > > Add an explicit tag protocol for the RZ/T2H ETHSW and register a separate
> > > ethsw tag driver so the existing A5PSW tag implementation can be reused
> > > for RZ/T2H without code duplication.
> > >
> > > The ETHSW IP on RZ/T2H shares substantial commonality with the A5PSW IP on
> > > RZ/N1, and the current tag driver does not touch the register fields that
> > > differ between the two blocks.
> >
> > Tagging protocol drivers are specifically written to not deal with
> > register fields. I would like a clarification that this is a phrasing
> > mistake and you mean the packet header fields that differ between the
> > ETHSW and the A5PSW tag format.
> >
> Unlike the other drivers, tagging drivers don't have compatible
> strings to match against. For the ETHSW IP, the current driver is
> reused as-is. My intention with the comment was simply to point out
> that, if an issue ever arises that requires us to split the paths, we
> can future-proof things by using DSA_TAG_PROTO_* identifiers.

The tagging protocol's name uniquely defines the layout of the DSA
header and general interaction procedure required on RX and TX (for more
complex things such as PTP). It doesn't have to be further namespaced by
its users just because. In other words, two switch drivers using the
same tagging protocol with the same name is fine (even if due to a lack
of imagination, the tagging protocol's name comes just from its first
user), and introducing a new name for it would be unnecessary. For
example, felix_vsc9959.c, a switch different from ocelot_ext.c, uses
DSA_TAG_PROTO_OCELOT because the protocol is identical.

The exception would be when there exist packet headers which have
different layouts - then irrespective of whether those fields are
currently used or not, we should register a new driver.  This is the
only thing that matters.  I thought that you were saying that such
differences exist, but after your second reply, it seems not?

  reply	other threads:[~2025-11-21 20:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 11:35 [PATCH net-next 00/11] Add ETHSW support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2025-11-21 11:35 ` [PATCH net-next 01/11] net: dsa: tag_rzn1_a5psw: Drop redundant ETH_P_DSA_A5PSW definition Prabhakar
2025-11-21 19:17   ` Vladimir Oltean
2025-11-21 11:35 ` [PATCH net-next 02/11] net: dsa: tag_rzn1_a5psw: Add RZ/T2H ETHSW tag protocol and register ethsw tag driver Prabhakar
2025-11-21 19:27   ` Vladimir Oltean
2025-11-21 20:29     ` Lad, Prabhakar
2025-11-21 20:48       ` Vladimir Oltean [this message]
2025-11-21 21:30         ` Lad, Prabhakar
2025-11-21 21:36           ` Vladimir Oltean
2025-11-21 11:35 ` [PATCH net-next 03/11] net: dsa: Kconfig: Expand config description to cover RZ/T2H and RZ/N2H ETHSW Prabhakar
2025-11-21 19:30   ` Vladimir Oltean
2025-11-21 20:58     ` Lad, Prabhakar
2025-11-21 11:35 ` [PATCH net-next 04/11] dt-bindings: net: dsa: renesas,rzn1-a5psw: Add RZ/T2H and RZ/N2H ETHSW support Prabhakar
2025-11-27 13:16   ` Geert Uytterhoeven
2025-11-21 11:35 ` [PATCH net-next 05/11] net: dsa: rzn1-a5psw: Add support for optional reset control Prabhakar
2025-11-21 11:43   ` Philipp Zabel
2025-11-21 19:37   ` Vladimir Oltean
2025-11-21 11:35 ` [PATCH net-next 06/11] net: dsa: rzn1-a5psw: Add support for optional timestamp clock Prabhakar
2025-11-21 19:39   ` Vladimir Oltean
2025-11-26 17:42     ` Lad, Prabhakar
2025-11-24 12:45   ` Geert Uytterhoeven
2025-11-26 17:43     ` Lad, Prabhakar
2025-11-21 11:35 ` [PATCH net-next 07/11] net: dsa: rzn1-a5psw: Make switch topology configurable via OF data Prabhakar
2025-11-21 20:34   ` Vladimir Oltean
2025-11-21 21:41     ` Lad, Prabhakar
2025-11-21 11:35 ` [PATCH net-next 08/11] net: dsa: rzn1-a5psw: Make DSA tag protocol " Prabhakar
2025-11-21 20:55   ` Vladimir Oltean
2025-11-26 20:02     ` Lad, Prabhakar
2025-11-21 11:35 ` [PATCH net-next 09/11] net: dsa: rzn1-a5psw: Add support for management port frame length adjustment Prabhakar
2025-11-21 21:05   ` Vladimir Oltean
2025-12-09 16:02     ` Lad, Prabhakar
2025-12-09 21:28       ` Vladimir Oltean
2025-12-10 21:09         ` Lad, Prabhakar
2025-11-21 11:35 ` [PATCH net-next 10/11] net: dsa: rzn1-a5psw: Add support for RZ/T2H Ethernet switch Prabhakar
2025-11-21 11:35 ` [PATCH net-next 11/11] net: dsa: Kconfig: Enable support for RZ/T2H and RZ/N2H SoCs Prabhakar
2025-11-21 21:09   ` Vladimir Oltean

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=20251121204833.hu4jfq6bx2kdamd3@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=clement.leger@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /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