Realtek switch SoC docs

maple table: L2_UC

Details

Name
L2_UC
Feature
TABLE_ACCESS
Type
0
Entries
8192
Data width
96
Control register
TBL_ACCESS_L2_CTRL
Data register
TBL_ACCESS_L2_DATA

Description

An L2 unicast entry.

L2 unicast entries are distinguished from multicast entries by the multicast bit in the MAC address being 0. This bit is the LSB of the first byte of the MAC address, meaning MC MAC addresses will start with ‘x0-xx-…’, ‘x2-xx-..’, etc.

For unicast entries, forwarding is based on the MAC address and the Relay-VLAN ID (RVID) (*). Together they are hashed to create the key into the this table. The table also has a VLAN entry which defines the VLAN that is assigned to the packet matching this table entry during forwarding operation. Note that RVID and VID can be different. Entries in VLAN 100 will be assigned VID 100 and RVID 100 by hardware learning. However, entries learned from packets without a VLAN tag have VID 0, while RVID is RVID 1 and will follow forwarding rules set up for VLAN 1.

For matching against the RVID, both the inner and outer VID of a packet can be used, this can be defined per VLAN. In OpenWRT we are forwarding based on the inner VLAN-ID. The inner VLAN-ID is the VLAN derived from the VLAN-Tag of the packet during ingress translation, the outer VID is the 802.1q tag. During forwarding the inner VID is mangled by the L2 forwarding decision and then on egress can be again translated into a different 802.1q tag.

(*) It is also possible to use a dedicated Forwarding ID (FID) instead of the RVID, which is based on the MSTI. This is configurable per vlan. In OpenWRT we use the RVID exclusively.

Fields

Name LSB Bits Description
IP_MC 86 1

1: this is an IP multicast table entry. Must be 0 for L2_UC entries.

IP6_MC 85 1

1: this is an IPv6 multicast table entry. Must be 0 for L2_UC entries.

STATIC 83 1

A static entry that does not age.

AGE 81 2
SLP 76 5

The source port this MAC address was learned from (Source Learning Port)

VID 64 12

VLAN-ID assigned to packets matching this entry.

SA_BLK 63 1

Block this as source address.

DA_BLK 62 1

Block this as destination address.

SUSPEND 61 1
NEXT_HOP 60 1

This entry is actually a next hop entry, see L2_NEXT_HOP

MAC 12 48

The MAC that has been learned for forwarding.

FID_RVID 0 12

The Forwarding ID or Relay VLAN-ID, both used as part of the hash key to find this entry together with the MAC.