This example exercises the MAC loopback functionality of the hardware. The CPSW hardware is opened with default initialization parameters and either the MAC loopback is enabled based on the user input.
Create periodic tick task
=============================
Enet Loopback: Iteration 1
=============================
CPSW_3G Test
initQs() txFreePktInfoQ initialized with 16 pkts
Host MAC address: 70:ff:76:1d:ec:f2
PHY 0 is alive
Received 5000 packets
Delete EnetLpbk_rxTask() and exit..
Transmitted 5000 packets
Delete EnetLpbk_txTask() and exit..
Port 0 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
Port 1 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
txPri[0] = 5000
txPriBcnt[0] = 2590000
Cpsw_handleLinkDown: Port 1: Link down
Test complete: PASS
Delete EnetLpbk_tickTask() and exit..
Create periodic tick task
=============================
Enet Loopback: Iteration 2
=============================
CPSW_3G Test
initQs() txFreePktInfoQ initialized with 16 pkts
Host MAC address: 70:ff:76:1d:ec:f2
PHY 0 is alive
Received 5000 packets
Delete EnetLpbk_rxTask() and exit..
Transmitted 5000 packets
Delete EnetLpbk_txTask() and exit..
Port 0 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
Port 1 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
txPri[0] = 5000
txPriBcnt[0] = 2590000
Cpsw_handleLinkDown: Port 1: Link down
Test complete: PASS
Delete EnetLpbk_tickTask() and exit..
Create periodic tick task
=============================
Enet Loopback: Iteration 3
=============================
CPSW_3G Test
initQs() txFreePktInfoQ initialized with 16 pkts
Host MAC address: 70:ff:76:1d:ec:f2
PHY 0 is alive
Received 5000 packets
Delete EnetLpbk_rxTask() and exit..
Transmitted 5000 packets
Delete EnetLpbk_txTask() and exit..
Port 0 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
Port 1 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
txPri[0] = 5000
txPriBcnt[0] = 2590000
Cpsw_handleLinkDown: Port 1: Link down
Test complete: PASS
Delete EnetLpbk_tickTask() and exit..
Create periodic tick task
=============================
Enet Loopback: Iteration 4
=============================
CPSW_3G Test
initQs() txFreePktInfoQ initialized with 16 pkts
Host MAC address: 70:ff:76:1d:ec:f2
PHY 0 is alive
Received 5000 packets
Delete EnetLpbk_rxTask() and exit..
Transmitted 5000 packets
Delete EnetLpbk_txTask() and exit..
Port 0 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
Port 1 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
txPri[0] = 5000
txPriBcnt[0] = 2590000
Cpsw_handleLinkDown: Port 1: Link down
Test complete: PASS
Delete EnetLpbk_tickTask() and exit..
Create periodic tick task
=============================
Enet Loopback: Iteration 5
=============================
CPSW_3G Test
initQs() txFreePktInfoQ initialized with 16 pkts
Host MAC address: 70:ff:76:1d:ec:f2
PHY 0 is alive
Received 5000 packets
Delete EnetLpbk_rxTask() and exit..
Transmitted 5000 packets
Delete EnetLpbk_txTask() and exit..
Port 0 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
Port 1 Statistics
-----------------------------------------
rxGoodFrames = 5000
rxBcastFrames = 5000
rxOctets = 2590000
txGoodFrames = 5000
txBcastFrames = 5000
txOctets = 2590000
octetsFrames512to1023 = 10000
netOctets = 5180000
txPri[0] = 5000
txPriBcnt[0] = 2590000
Cpsw_handleLinkDown: Port 1: Link down
Test complete: PASS
Delete EnetLpbk_tickTask() and exit..
Loopback application completed