Realtek switch SoC docs

longan table: L3_PREFIX_ROUTE_IPUC

Details

Name
L3_PREFIX_ROUTE_IPUC
Feature
LAYER_3_ROUTING
Type
2
Entries
512
Data width
352
Control register
TBL_ACCESS_CTRL_1
Data register
TBL_ACCESS_DATA_1

Description

Main table for L3 prefix routes.

Entries can be either IPv4 Unicast, Multicast or IPv6 UC/MC. Entries in the table are stored in an associative memory and can be directly looked up by the hardware. The driver can look up entries via L3_HW_LU_KEY_CTRL

Note: this table space holds a union of entries of table types L3_PREFIX_ROUTE_*, which are distinguished by the entry type values, which are always at the same register position in the table data. See there for the different types.

Fields

Name LSB Bits Description
VALID 351 1

1: The routing entry is valid, 0: it is invalid and ignored

ENTRY_TYPE 349 2

Type of the table entry: 0: IPv4 Unicast route 1: IPV4 Multicast route 2: IPv6 Unicast route 3: IPv6 Multicast route

IP 192 32

The IPv4 address of the routed network or host

BMSK_ENTRY_TYPE 189 2

Probably a bit-mask for the ENTRY_TYPE, always set to 0x3 in the SDK

BMSK_IP 32 32

Network bit-mask for the routed network IP address

E.g 0xffffff00 (255.255.255.0) when the routed IP-address is a /24 network.

HIT 22 1
HOST_ROUTE 21 1

Set to 1 for a /32 route (a route to a particular host)

DFLT_ROUTE 20 1

Set to 1 for a /0 route (default route)

ACTION 18 2

0: FORWARD, 1: TRAP2CPU, 2:COPY2CPU, 3: DROP

NH_IDX 7 11

An index into the L3_NEXTHOP table.

TTL_DEC 6 1

Decrease the TTL of the routed packet.

TTL_CHK 5 1

Drop the packet if the TTL is 0.

DST_NULL_INTF 4 1

The destination interface is the NULL interface

It is not clear what the difference to merely dropping the packet is, but NULL-interfaces are used for access control mechanisms The SDK sets up several NULL interfaces for the 802.x support.

QOS_AS 3 1

QOS_PRI valid (1) nor not valid

QOS_PRI 0 3

New quality of Service priority for a packet routed by this route