Skip to content
Commit 670c35dd authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Xulin Sun
Browse files

net: dsa: add a second tagger for Ocelot switches based on tag_8021q



There are use cases for which the existing tagger, based on the NPI
(Node Processor Interface) functionality, is insufficient.

Namely:
- Frames injected through the NPI port bypass the frame analyzer, so no
  source address learning is performed, no TSN stream classification,
  etc.
- Flow control is not functional over an NPI port (PAUSE frames are
  encapsulated in the same Extraction Frame Header as all other frames)
- There can be at most one NPI port configured for an Ocelot switch. But
  in NXP LS1028A and T1040 there are two Ethernet CPU ports. The non-NPI
  port is currently either disabled, or operated as a plain user port
  (albeit an internally-facing one). Having the ability to configure the
  two CPU ports symmetrically could pave the way for e.g. creating a LAG
  between them, to increase bandwidth seamlessly for the system.

So there is a desire to have an alternative to the NPI mode. This change
keeps the default tagger for the Seville and Felix switches as "ocelot",
but it can be changed via the following device attribute:

echo ocelot-8021q > /sys/class/<dsa-master>/dsa/tagging

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 7c83a7c5

)
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
(conflicts in include/net/dsa.h with commits
 01ef09ca ("net: dsa: Add tag handling for Hirschmann Hellcreek switches")
 54a52823

 ("dsa: add support for Arrow XRS700x tag trailer"))
[Xulin: Original patch taken from
https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable]
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent d57b8be0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment