The layer 2 cpsw switch example is dedicated to demonstrate usage of Enet CPSW3G peripheral operation as a basic switch.
==========================
Layer 2 CPSW SWITCH Test
==========================
Init all peripheral clocks
----------------------------------------------
Enabling clocks!
Create RX tasks
----------------------------------------------
cpsw-3g: Create RX task
Open all peripherals
----------------------------------------------
cpsw-3g: Open enet
EnetAppUtils_reduceCoreMacAllocation: Reduced Mac Address Allocation for CoreId:1 From 4 To 1
Init all configs
----------------------------------------------
cpsw-3g: init config
cpsw-3g: Open port 1
EnetPhy_bindDriver:1842
cpsw-3g: Open port 2
EnetPhy_bindDriver:1842
PHY 0 is alive
PHY 1 is alive
Attach core id 1 on all peripherals
----------------------------------------------
cpsw-3g: Attach core
cpsw-3g: Open DMA
initQs() txFreePktInfoQ initialized with 16 pkts
cpsw-3g: Waiting for link up...
Cpsw_handleLinkUp:1450
MAC Port 2: link up
Cpsw_handleLinkUp:1450
MAC Port 1: link up
cpsw-3g: Port 1 link is up
cpsw-3g: Port 2 link is up
cpsw-3g: MAC port addr: 58:a1:5f:b8:8c:e6
Enet L2 cpsw Menu:
's' - Print statistics
'r' - Reset statistics
'm' - Show allocated MAC addresses
'p' - Enable Policer for rate limiting
'x' - Stop the test
s
Print statistics
----------------------------------------------
cpsw-3g - Port 1 statistics
--------------------------------
cpsw-3g - Port 2 statistics
--------------------------------
p
Rate limiting Enabled port 1 on Src MAC 02:00:00:00:00:08
s
Print statistics
----------------------------------------------
rxGoodFrames = 100000
rxOctets = 101800000
txGoodFrames = 100000
txBcastFrames = 100000
txOctets = 101800000
octetsFrames512to1023 = 200000
netOctets = 203600000
txPri[0] = 100000
txPriBcnt[0] = 101800000
cpsw-3g - Port 1 statistics
--------------------------------
txGoodFrames = 150000
txBcastFrames = 100000
txOctets = 152700000
octetsFrames512to1023 = 150000
netOctets = 152700000
txPri[0] = 150000
txPriBcnt[0] = 152700000
rxGoodFrames = 100000
rxOctets = 101800000
txGoodFrames = 100000
txBcastFrames = 100000
txOctets = 101800000
octetsFrames512to1023 = 200000
netOctets = 203600000
txPri[0] = 100000
txPriBcnt[0] = 101800000
cpsw-3g - Port 2 statistics
--------------------------------
rxGoodFrames = 100000
rxBcastFrames = 100000
rxOctets = 101800000
txGoodFrames = 50000
txOctets = 50900000
octetsFrames512to1023 = 150000
netOctets = 152700000
aleUnknownBcast = 1
aleUnknownBcastBcnt = 1018
txPri[0] = 50000
txPriBcnt[0] = 50900000