From: Paolo Abeni Date: Thu, 21 May 2026 11:04:44 +0000 (+0200) Subject: Merge branch 'add-preliminary-netc-switch-support-for-i-mx94' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73366893d1d58d247bef70406280f71030495424;p=thirdparty%2Flinux.git Merge branch 'add-preliminary-netc-switch-support-for-i-mx94' Wei Fang says: ==================== 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. ==================== Link: https://patch.msgid.link/20260518082506.1318236-1-wei.fang@nxp.com Signed-off-by: Paolo Abeni --- 73366893d1d58d247bef70406280f71030495424