MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Hardware Switch

Overview

Group for switch specific hardware API and data structure.

Data Structures

struct  netc_swt_imr_config_t
 Switch Ingress mirror destination config. More...
 
struct  netc_swt_port_bridge_config_t
 Switch port bridge configuration. More...
 
struct  netc_swt_port_fm_config_t
 Switch Port level Frame Modification configuration (PPCPDEIMR and PQOSMR[QVMP]) More...
 
struct  netc_swt_default_vlan_filter_t
 Switch VLAN filter hash table default entry configuration, which determines the default entry when not found in VLAN filter lookup. More...
 
struct  netc_swt_bridge_config_t
 Bridge config. More...
 
struct  netc_swt_psfp_config_t
 Switch PSFP configuration. More...
 
struct  netc_swt_qos_classify_config_t
 Switch Qos Classification configuration (include two profiles) More...
 
struct  netc_swt_qos_to_vlan_config_t
 Switch QoS to PCP mapping and PCP to PCP mapping configuration when egress packet modification the VLAN tag. More...
 
struct  netc_switch_inuse_fdb_statistic_t
 Switch static/dynamic FDB entries in-use statistic. More...
 

Enumerations

enum  netc_swt_port_bitmap_t {
  kNETC_SWTPort0Bit = 0x1U,
  kNETC_SWTPort1Bit = 0x2U,
  kNETC_SWTPort2Bit = 0x4U,
  kNETC_SWTPort3Bit = 0x8U,
  kNETC_SWTPort4Bit = 0x10U
}
 The switch port bitmap. More...
 
enum  netc_swt_imr_dest_port_t {
  kNETC_SWTPort0 = 0U,
  kNETC_SWTPort1 = 1U,
  kNETC_SWTPort2 = 2U,
  kNETC_SWTPort3 = 3U,
  kNETC_SWTPort4 = 4U,
  kNETC_SWTMPort = 5U
}
 The switch ingress mirror destination port. More...
 
enum  netc_swt_mac_forward_mode_t {
  kNETC_NoFDBLookUp = 1U,
  kNETC_FDBLookUpWithFlood = 2U,
  kNETC_FDBLookUpWithDiscard = 3U
}
 The switch MAC forwarding options. More...
 
enum  netc_swt_mac_learn_mode_t {
  kNETC_DisableMACLearn = 1U,
  kNETC_HardwareMACLearn,
  kNETC_SeSoftwareMACLearn,
  kNETC_UnseSoftwareMACLearn,
  kNETC_DisableMACLearnWithSMAC
}
 The switch MAC learning options. More...
 
enum  netc_swt_port_tx_vlan_act_t {
  kNETC_NoTxVlanModify = 0U,
  kNETC_TxDelOuterVlan,
  kNETC_TxReplOuterVlanVid
}
 Switch transmit Bridge Port VLAN Tag Action. More...
 
enum  netc_swt_port_stg_mode_t {
  kNETC_DiscardFrame = 0U,
  kNETC_LearnWithoutFowrad,
  kNETC_ForwardFrame
}
 Switch port spanning tree group work mode. More...
 

Data Structure Documentation

struct netc_swt_imr_config_t

Data Fields

bool enMirror
 Enable ingress mirroring.
 
netc_swt_imr_dest_port_t destPort
 Port where ingress mirrored frames are sent.
 
uint8_t dr
 Mirrored packet's DR (drop resilience)
 
uint8_t ipv
 Mirrored packet's IPV (internal priority value)
 
uint8_t efmLengthChange
 Egress Frame Modification Frame Length change in 2s complement notation, Vaild if efmEntryID is noy null.
 
uint16_t efmEntryID
 Egress Frame Modification Entry Id, note 0xFFFF is a Null Frame Modification Entry, Only applicable if destPort != kNETC_SWTMPort.
 
struct netc_swt_port_bridge_config_t

Data Fields

netc_swt_port_tx_vlan_act_t txVlanAction: 2
 Only applies for the frame outer VLAN tag's VID is equal to the port default VID.
 
bool isRxVlanAware: 1
 Receive VLAN Aware Mode.
 
bool acceptUntag: 1
 Accept untagged frame.
 
bool acceptPriorityTag: 1
 Accept priority tagged frame (VID = 0)
 
bool acceptSingleTag: 1
 Accept single tagged frame.
 
bool acceptDoubleTag: 1
 Accept double tagged frame (ounter and inner)
 
bool enSrcPortPrun: 1
 Enable/Disable received frame be transmitted to same port it was received.
 
bool enMacStationMove: 1
 Enable/Disable received frame which ingress port not match the FDB entry Destination Port Bitmap.
 
bool enBcastStormCtrl: 1
 Enable/Disable Storm control for broadcast frames.
 
bool enMcastStormCtrl: 1
 Enable/Disable Storm control for multicast frames.
 
bool enUnMcastStormCtrl: 1
 Enable/Disable Storm control for unknown multicast frames.
 
bool enUnUcastStormCtrl: 1
 Enable/Disable Storm control for unknown unicast frames.
 
uint32_t bcastRpEntryID
 Broadcast rate policer entry ID. More...
 
uint32_t mcastEntryID
 Known multicast rate policer entry ID. More...
 
uint32_t unMcastRpEntryID
 Unknown multicast policer entry ID. More...
 
uint32_t unUcastRpEntryID
 Unknown unicast rate policer entry ID. More...
 
uint16_t maxDynaFDBEntry
 The maximium number of dynamic entries in the FDB table, 0 means no limit.
 
uint32_t vid: 12
 Vlan Identifier. More...
 
uint32_t dei: 1
 Drop eligible indicator.
 
uint32_t pcp: 3
 Priority code point. More...
 
uint32_t tpid: 1
 Tag protocol identifier, 0 = Standard C-VLAN 0x8100, 1 = Standard S-VLAN 0x88A8. More...
 

Field Documentation

uint32_t netc_swt_port_bridge_config_t::vid
uint32_t netc_swt_port_bridge_config_t::pcp
uint32_t netc_swt_port_bridge_config_t::tpid
uint32_t netc_swt_port_bridge_config_t::bcastRpEntryID

Valid if enBroadStormCtrl = true

uint32_t netc_swt_port_bridge_config_t::mcastEntryID

Valid if enBroadStormCtrl = true

uint32_t netc_swt_port_bridge_config_t::unMcastRpEntryID

Valid if enUnMultiStormCtrl = true

uint32_t netc_swt_port_bridge_config_t::unUcastRpEntryID

Valid if enUnUniStormCtrl = true

struct netc_swt_port_fm_config_t

Data Fields

bool ignoreFMMiscfg: 1
 Enable/Disable ignore the Frame Modification Misconfiguration Action.
 
bool enEgressPcpMap: 1
 Enable egress frame modification of outer VLAN tag's PCP value is mapped to a new value based on egressPcpMap, used for Frame Modification VLAN Outer PCP action.
 
bool enIngressPcpMap: 1
 Enable ingress frame modification of outer VLAN tag's PCP value is mapped to a new value based on egressPcpMap, used for Frame Modification VLAN Outer PCP action.
 
bool enUpdateVlanDei: 1
 Enable update DR value in the outer VLAN based on DEnDEI field, used for egress Frame Modification Outer DEI action.
 
uint8_t drToDeiMap: 4
 Mapping of internal QoS's DR value n to VLAN DEI, The 4 bits correspond to the DR3 ~ DR0, and 1 means DRn mapping to DEI 1, 0 means DRn mapping to DEI 0.
 
uint8_t egressPcpMap: 4
 Egress PCP to PCP Mapping Profile instance, active when enEgressPcpMap is true.
 
uint8_t ingressPcpMap: 4
 Ingress PCP to PCP Mapping Profile instance, active when enIngressPcpMap is true.
 
uint8_t qosVlanMap: 4
 Transmit QoS to VLAN PCP Mapping Profile index, used for egress Frame Modification VLAN Add/Replace Action.
 
struct netc_swt_default_vlan_filter_t

Data Fields

bool enIPMFlood
 Enable IP Multicast Flooding.
 
bool enIPMFilter
 Enable IP Multicast Filtering.
 
uint8_t stgID
 Spanning Tree Group Member ID, range in 0 ~ 15.
 
uint8_t portMembership
 The bit 0 ~ 4 correspond to the 5 ports, When bit set (0b1), means the port is a member of this VLAN. More...
 
bool enUseFilterID
 Enable use the specified filterID as FID, otherwise will use the frame VID.
 
uint16_t filterID
 Used as a key value to do FDB table and the L2 IPV4 Multicast Filter table lookup. More...
 
netc_swt_mac_forward_mode_t mfo
 MAC forwarding options.
 
netc_swt_mac_learn_mode_t mlo
 MAC learning options.
 
uint16_t baseETEID
 Base Egress Treatment Entry ID.
 
uint8_t etaPortBitmap
 Egress Treatment Applicability Port. More...
 

Field Documentation

uint8_t netc_swt_default_vlan_filter_t::portMembership

Port membership is used for source/destination pruning

uint16_t netc_swt_default_vlan_filter_t::filterID

Valid if enUseFilterID is true

uint8_t netc_swt_default_vlan_filter_t::etaPortBitmap

Valid if baseETEID is not null.

struct netc_swt_bridge_config_t

Data Fields

netc_swt_default_vlan_filter_t dVFCfg
 Default VLAN filter entry configuration when not found in VLAN filter lookup.
 
struct netc_swt_psfp_config_t

Data Fields

netc_isi_kc_rule_t kcRule [4]
 Key construction rules.
 
struct netc_swt_qos_classify_config_t
struct netc_swt_qos_to_vlan_config_t
struct netc_switch_inuse_fdb_statistic_t

Data Fields

uint16_t camEntries
 Number of FDB entries in-use in the CAM. More...
 
uint16_t staticEntries
 Number of static FDB entries in-use (both hash-based and CAM-based entries). More...
 
uint16_t dynamicEntries
 Number of dynamic FDB entries in-use (hash-based and CAM-based entries). More...
 
uint16_t dynamicEntriesHWM
 High water mark of dynamic entries in-use in the FDB table. More...
 

Field Documentation

uint16_t netc_switch_inuse_fdb_statistic_t::camEntries
uint16_t netc_switch_inuse_fdb_statistic_t::staticEntries
uint16_t netc_switch_inuse_fdb_statistic_t::dynamicEntries
uint16_t netc_switch_inuse_fdb_statistic_t::dynamicEntriesHWM

Enumeration Type Documentation

Enumerator
kNETC_SWTPort0Bit 

Switch port0 bitmap.

kNETC_SWTPort1Bit 

Switch port1 bitmap.

kNETC_SWTPort2Bit 

Switch port2 bitmap.

kNETC_SWTPort3Bit 

Switch port3 bitmap.

kNETC_SWTPort4Bit 

Switch port4 (internal port) bitmap.

Enumerator
kNETC_SWTPort0 

Switch port0.

kNETC_SWTPort1 

Switch port1.

kNETC_SWTPort2 

Switch port2.

kNETC_SWTPort3 

Switch port3.

kNETC_SWTPort4 

Switch port4.

kNETC_SWTMPort 

Switch management port.

Enumerator
kNETC_NoFDBLookUp 

No FDB lookup is performed, the frame is flooded.

kNETC_FDBLookUpWithFlood 

FDB lookup is performed, and if there is no match, the frame is flooded to the port bitmap in VLAN filter entry.

kNETC_FDBLookUpWithDiscard 

FDB lookup is performed, and if there is no match, the frame is discarded.

Enumerator
kNETC_DisableMACLearn 

Disable MAC learning.

SMAC FDB lookup is by-passed.

kNETC_HardwareMACLearn 

Hardware MAC learning is enabled.

kNETC_SeSoftwareMACLearn 

Software MAC learning secure.

FDB lookup based on FID and SMAC is performed and if an entry is not found, the frame is redirected to the switch management port.

kNETC_UnseSoftwareMACLearn 

Software MAC learning unsecure.

FDB lookup based on FID and SMAC is performed and if an entry is not found, the frame is copied to the switch management port.

kNETC_DisableMACLearnWithSMAC 

Disable MAC learning with SMAC validation.

FDB lookup based on FID and SMAC is performed and if an entry is not found, the frame is discarded.

Enumerator
kNETC_NoTxVlanModify 

No egress VLAN modification performed.

kNETC_TxDelOuterVlan 

Delete outer VLAN tag.

kNETC_TxReplOuterVlanVid 

Replace outer VLAN tag's VID with 0; frame to be transmitted as a priority tag frame.

Enumerator
kNETC_DiscardFrame 

Tx or RX Frames on this port with current spanning tree group ID will be discarded.

kNETC_LearnWithoutFowrad 

RX Frames on this port with current spanning tree group ID will do Learn SMAC, but do not forward, Tx Frame will be discarded.

kNETC_ForwardFrame 

RX Frames on this port with current spanning tree group ID will do both MAC learning and forwarding, , Tx Frame will be forwarded.