Hi TI,
Now we used TDA4VM CPSW_9G Ethernet switch and SDK7.2.
The Ethernet topology as the diagram below.
The Ethernet communication without VLAN is ok. But now we need to add VLAN info on host port(P0) and port1 and the Ethernet communication is down.
We want add VLAN3 and VLAN4 both on P0 and P1.
The Ethernet frame with VLAN tag can be send out successfully form QNX side, we have seen it from tcpdump. But the switch can not forward it.
We have modify some codes about the switch like below:
1. void EthHwInterVlan_setOpenPrms(Cpsw_Cfg *pCpswCfg) (in eth_hwintervlan.c)
pCpswCfg->hostPortCfg.vlanCfg.portPri = 7;
pCpswCfg->hostPortCfg.vlanCfg.portCfi = 0;
pCpswCfg->hostPortCfg.vlanCfg.portVID = 3;
pCpswCfg->vlanCfg.vlanAware = TRUE;
We add VLAN 3 on host port here and how to add another VLAN 4?
2.static EthFw_Port gEthAppPorts[] (in tirtos.c)
static EthFw_Port gEthAppPorts[] =
{
#if defined(SOC_J721E)
/* On J721E EVM to use all 8 ports simultaneously, we use below configuration
RGMII Ports - 1,3,4,8. QSGMII ports - 2,5,6,7 */
{
.portNum = ENET_MAC_PORT_1,
.vlanCfg = { .portPri = 0U, .portCfi = 0U, .portVID = 3U },
},
{
.portNum = ENET_MAC_PORT_1,
.vlanCfg = { .portPri = 0U, .portCfi = 0U, .portVID = 4U },
},
{
.portNum = ENET_MAC_PORT_3, /* RGMII */
.vlanCfg = { .portPri = 0U, .portCfi = 0U, .portVID = 0U }
},
{
.portNum = ENET_MAC_PORT_4, /* RGMII */
.vlanCfg = { .portPri = 0U, .portCfi = 0U, .portVID = 0U }
},
{
.portNum = ENET_MAC_PORT_8, /* RGMII */
.vlanCfg = { .portPri = 0U, .portCfi = 0U, .portVID = 0U }
},