RZ/N2L Misc
Extended Frame Parser
The Extended Frame Parser (EFP) supports ingress filtering and ethernet frame header manipulation according to IEEE 802.1CB / 802.1Q. (For details refer to the HW user manual.)
This description is valid for RZ/N2L FSP 3.1.0 / 4.0.0.
API
Most APIs are ethernet-port-specific.
API | Description |
|---|---|
--- General --- | |
R_ETHSW_EfpInitilizeAsiTable | Initialize the ASI table (undefined after reset) and enable EFP for the three ethernet ports. (Mandatory) |
R_ETHSW_EfpChannelEnable | Enable channel (corresponding to ethernet port). |
R_ETHSW_EfpInterruptEnable | Enable interrupt for drop due to gating error/maxSDU exceed/flow meter or parser error, and provide pointer to callback function. |
R_ETHSW_EfpStatusGet | Get interrupt status of EFP (stream filter error, gate error, meter error, parser runtime error). |
R_ETHSW_StatisticsEfpGet | Get EFP counter statistics for all SIDs for a given port. |
--- Active Stream Identification (ASI) --- | |
R_ETHSW_EfpAsiTableSet | Add an ASI table entry for a stream, defined by Destination MAC and VLAN ID. Define Dest MAC and VLAN for overwriting, SID for an optionally fixed filter. |
R_ETHSW_EfpAsiTableDelete | Delete and ASI table entry. |
--- VLAN processing --- | |
R_ETHSW_EfpVlanVerificationModeSet | Set the VLAN ingress verification mode (VICM). |
R_ETHSW_EfpPriorityRegenerationSet | Set the VLAN input processing (VITM) and priority re-generation. |
--- Filter Setup --- | |
R_ETHSW_EfpFilterTableSet | Set an filter entry (SID). Configure match to Src or Dest MAC, tagged, VLAN, DEI, PCP with masks each. |
R_ETHSW_EfpQsfTableEnable | Enable/disable a filter entry defined by SID and port. |
--- Drop Criteria --- | |
R_ETHSW_EfpGatingCheckSet | Configure the criteria for Gating Check (Gate ID, mode). |
R_ETHSW_EfpSDUmaxVerificationSet | Configure the criteria for SDUmax (max SDU size, MSDU mode). |
R_ETHSW_EfpFlowMeteringSet | Configure the criteria for Flow Metering (mode, CBS, CIR, drop). |
Debugging
Counters can be read with API function R_ETHSW_StatisticsEfpGet() or from registers (clear on read):
Register | Parameter | Description |
|---|---|---|
Pn_LOOKUP_HIT_CNT | lookup_hit | ASI table look-up hit packets. |
Pn_VIC_DROP_CNT | vlan_in_drop | VLAN ingress check (VICM) dropped packets |
Pn_QSMFCs | qci_stream_match_pkts | Stream match packets (SID=0..7) |
Pn_QGPPC | qci_gate_passed_pkts | Gate passed packets (all). |
Pn_QGDPCg | qci_gate_dropped_pkts | Gate dropped packets (GID 0..7). |
Pn_QMSPPCs | qci_msdu_passed_pkts | MSDU passed packets (SID 0..7) |
Pn_QMSRPCs | qci_msdu_reject_pkts | MSDU rejected packets (SID 0..7) |
Pn_QMGPCm | qci_mater_green_pkts | Meter Green packets (MID 0..7) |
Pn_QMRPCm | qci_mater_red_pkts | Meter Red packets (MID 0..7) |
Notes
ASI entries cannot be configured for untagged (without C-tag) frames.