Add preliminary NETC switch support for i.MX94
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest15 patches 6 repliesApplied 15/15
- v715 patches 3 repliesSuperseded
- v615 patches 15 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 15 patches | 13 replies | Superseded | |
| v4 | 14 patches | 23 replies | Superseded | |
| v3 | 14 patches | 2 replies | Superseded | |
| v2 | 14 patches | 11 replies | Superseded | |
| v1 | 14 patches | 14 replies | Superseded |
Changes in v8 from the cover letter
1. Remove the duplicated 'is' in the help text of NET_DSA_NETC_SWITCH
2. Replace num_fdb_gmac with htmcapr_num_words
3. Update NETC_PAUSE_THRESH and related thresholds of buffer pool entry
4. Remove the read-reset registers from netc_port_counters, and also update the commit message of patch 15
v7 link: https://lore.kernel.org/imx/[email protected]/
v6 link: https://lore.kernel.org/imx/[email protected]/
v5 link: https://lore.kernel.org/imx/[email protected]/
v4 link: https://lore.kernel.org/imx/[email protected]/
v3 link: https://lore.kernel.org/imx/[email protected]/
v2 link: https://lore.kernel.org/imx/[email protected]/
v1 link: https://lore.kernel.org/imx/[email protected]/
---
Patches in v8 All 15 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | dt-bindings: net: dsa: update the description of 'dsa,member' propertyDocumentation/ | +5 | 0 replies | Applied |
| 2/15 | dt-bindings: net: dsa: add NETC switchDocumentation/ | +131 | 0 replies | Applied |
| 3/15 | net: enetc: add pre-boot initialization for i.MX94 switchdrivers/ | +163 | 0 replies | Applied |
| 4/15 | net: enetc: add basic operations to the FDB tabledrivers/ drivers/ include/ | +307 | 0 replies | Applied |
| 5/15 | net: enetc: add support for the "Add" operation to VLAN filter tabledrivers/ drivers/ include/ | +93 | 0 replies | Applied |
| 6/15 | net: enetc: add support for the "Update" operation to buffer pool tabledrivers/ drivers/ include/ | +74 | 0 replies | Applied |
| 7/15 | net: enetc: add support for "Add" and "Delete" operations to IPFTdrivers/ drivers/ include/ | +209 | 0 replies | Applied |
| 8/15 | net: enetc: add multiple command BD rings supportdrivers/ | +9 | 0 replies | Applied |
| 9/15 | net: dsa: add NETC switch tag supportinclude/ include/ include/ +3 more | +242 | 1 reply | Applied |
| 10/15 | net: dsa: netc: introduce NXP NETC switch driver for i.MX94MAINTAINERS drivers/ drivers/ +6 more | +906 | 1 reply | Applied |
| 11/15 | net: dsa: netc: add phylink MAC operationsdrivers/ drivers/ drivers/ +1 more | +315 | 1 reply | Applied |
| 12/15 | net: dsa: netc: add FDB, STP, MTU, port setup and host flooding supportdrivers/ drivers/ drivers/ | +663 | 1 reply | Applied |
| 13/15 | net: dsa: netc: initialize buffer pool table and implement flow-controldrivers/ drivers/ drivers/ +1 more | +160 | 0 replies | Applied |
| 14/15 | net: dsa: netc: add support for the standardized countersdrivers/ drivers/ drivers/ +3 more | +333 | 1 reply | Applied |
| 15/15 | net: dsa: netc: add support for ethtool private statisticsdrivers/ drivers/ drivers/ +1 more | +165 | 1 reply | Applied |
Reviews trailers per patch
3 of 15 patches have a Reviewed-by or Acked-by.
| Patch | Rob Herring (Arm) | Frank Li | Maxime Chevallier |
|---|---|---|---|
| 1/15 | A-b | ||
| 2/15 | R-b | R-b | |
| 3/15 | |||
| 4/15 | |||
| 5/15 | |||
| 6/15 | |||
| 7/15 | |||
| 8/15 | |||
| 9/15 | |||
| 10/15 | |||
| 11/15 | R-b | ||
| 12/15 | |||
| 13/15 | |||
| 14/15 | |||
| 15/15 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v8 net-next 00/15] Add preliminary NETC switch support for i.MX94
i.MX94 NETC (v4.3) integrates 802.1Q Ethernet switch functionality, the switch provides advanced QoS with 8 traffic classes and a full range of TSN standards capabilities. It has 3 user ports and 1 CPU port, and the CPU port is connected to an internal ENETC through the pseduo link, so instead of a back-to-back MAC, the lightweight "pseudo MAC" is used at both ends of the pseudo link to transfer Ethernet frames. The pseudo link provides a zero-copy interface (no serialization delay) and lower power (less logic and memory).
Like most Ethernet switches, the NETC switch also supports a proprietary switch tag, is used to carry in-band metadata information about frames. This in-band metadata information can include the source port from which the frame was received, what was the reason why this frame got forwarded to the entity, and for the entity to indicate the precise destination port of a frame. The NETC switch tag is added to frames after the source MAC address. There are three types of switch tags, and each type has 1 to 4 subtypes, more details are as follows.
Forward switch tag (Type = 0): Represents forwarded frames.
- SubType = 0 - Normal frame processing.
To_Port switch tag (Type = 1): Represents frames that are to be sent to a specific switch port.
- SubType = 0. No request to perform timestamping.
- SubType = 1. Request to perform one-step timestamping.
- SubType = 2. Request to perform two-step timestamping.
- SubType = 3. Request to perform both one-step timestamping and two-step timestamping.
To_Host switch tag (Type = 2): Represents frames redirected or copied to the switch management port.
- SubType = 0. Received frames redirected or copied to the switch management port.
- SubType = 1. Received frames redirected or copied to the switch management port with captured timestamp at the switch port where the frame was received.
- SubType = 2. Transmit timestamp response (two-step timestamping).
Currently, this patch set supports Forward tag, SubType 0 of To_Port tag and SubType 0 of To_Host tag. More tags will be supported in the future.
In addition, the switch supports NETC Table Management Protocol (NTMP), some switch functionality is controlled using control messages sent to the hardware using BD ring interface with 32B descriptors similar to the packet Transmit BD ring used on ENETC. This interface is referred to as the command BD ring. This is used to configure functionality where the underlying resources may be shared between different entities or being too large to configure using direct registers.
For this patch set, we have supported the following tables through the command BD ring interface.
FDB Table: It contains forwarding and/or filtering information about MAC addresses. The FDB table is used for MAC learning lookups and MAC forwarding lookups.
VLAN Filter Table: It contains configuration and control information for each VLAN configured on the switch.
Buffer Pool Table: It contains buffer pool configuration and operational information. Each entry corresponds to a buffer pool. Currently, we use this table to implement flow control feature on each port.
Ingress Port Filter Table: It contains a set of filters each capable of classifying incoming traffic using a mix of L2, L3, and L4 parsed and arbitrary field data. We use this table to implement host flood support to the switch port.
The switch also supports other tables, and we will add more advanced features through them in the future.
---
v8:
1. Remove the duplicated 'is' in the help text of NET_DSA_NETC_SWITCH
2. Replace num_fdb_gmac with htmcapr_num_words
3. Update NETC_PAUSE_THRESH and related thresholds of buffer pool entry
4. Remove the read-reset registers from netc_port_counters, and also update the commit message of patch 15
v7 link: https://lore.kernel.org/imx/[email protected]/
v6 link: https://lore.kernel.org/imx/[email protected]/
v5 link: https://lore.kernel.org/imx/[email protected]/
v4 link: https://lore.kernel.org/imx/[email protected]/
v3 link: https://lore.kernel.org/imx/[email protected]/
v2 link: https://lore.kernel.org/imx/[email protected]/
v1 link: https://lore.kernel.org/imx/[email protected]/
---
Wei Fang (15):
dt-bindings: net: dsa: update the description of 'dsa,member' property
dt-bindings: net: dsa: add NETC switch
net: enetc: add pre-boot initialization for i.MX94 switch
net: enetc: add basic operations to the FDB table
net: enetc: add support for the "Add" operation to VLAN filter table
net: enetc: add support for the "Update" operation to buffer pool
table
net: enetc: add support for "Add" and "Delete" operations to IPFT
net: enetc: add multiple command BD rings support
net: dsa: add NETC switch tag support
net: dsa: netc: introduce NXP NETC switch driver for i.MX94
net: dsa: netc: add phylink MAC operations
net: dsa: netc: add FDB, STP, MTU, port setup and host flooding
support
net: dsa: netc: initialize buffer pool table and implement
flow-control
net: dsa: netc: add support for the standardized counters
net: dsa: netc: add support for ethtool private statistics
.../devicetree/bindings/net/dsa/dsa.yaml | 6 +- .../bindings/net/dsa/nxp,netc-switch.yaml | 131 ++ MAINTAINERS | 11 + drivers/net/dsa/Kconfig | 2 + drivers/net/dsa/Makefile | 1 + drivers/net/dsa/netc/Kconfig | 15 + drivers/net/dsa/netc/Makefile | 3 + drivers/net/dsa/netc/netc_ethtool.c | 291 +++ drivers/net/dsa/netc/netc_main.c | 1585 +++++++++++++++++ drivers/net/dsa/netc/netc_platform.c | 87 + drivers/net/dsa/netc/netc_switch.h | 173 ++ drivers/net/dsa/netc/netc_switch_hw.h | 366 ++++ .../ethernet/freescale/enetc/netc_blk_ctrl.c | 185 +- drivers/net/ethernet/freescale/enetc/ntmp.c | 391 +++- .../ethernet/freescale/enetc/ntmp_private.h | 122 +- include/linux/dsa/tag_netc.h | 14 + include/linux/fsl/netc_global.h | 6 + include/linux/fsl/ntmp.h | 186 +- include/net/dsa.h | 2 + include/uapi/linux/if_ether.h | 1 + net/dsa/Kconfig | 10 + net/dsa/Makefile | 1 + net/dsa/tag_netc.c | 214 +++ 23 files changed, 3773 insertions(+), 30 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/dsa/nxp,netc-switch.yaml create mode 100644 drivers/net/dsa/netc/Kconfig create mode 100644 drivers/net/dsa/netc/Makefile create mode 100644 drivers/net/dsa/netc/netc_ethtool.c create mode 100644 drivers/net/dsa/netc/netc_main.c create mode 100644 drivers/net/dsa/netc/netc_platform.c create mode 100644 drivers/net/dsa/netc/netc_switch.h create mode 100644 drivers/net/dsa/netc/netc_switch_hw.h create mode 100644 include/linux/dsa/tag_netc.h create mode 100644 net/dsa/tag_netc.c
Signature · 1 line
2.34.1