Hi,
I'm trying to use the ALE to filter the incoming packet not directed to my Ethernet MAC addresses (I use both the external ethernet port). When I connect only one port it seems to work, but when I connect two port the packet are forwarded from one port to the other.
Since both ports are connected to the same switch and are in the same subnet, the C6678 generate an "infinite loop", since a packet entering port1 in forwarded to port 2 and then back to port1 by the switch.
A configure the ALE as follows:
uint32_t ale_ctrl= (1<<4) | //no learn (3<<0); //3=Forward, 2=learn, 1=block, 0=disable hCpsw->ALE_PORT_CONTROL_REG[0]=ale_ctrl; hCpsw->ALE_PORT_CONTROL_REG[1]=ale_ctrl; hCpsw->ALE_PORT_CONTROL_REG[2]=ale_ctrl; CSL_CPSW_3GF_ALE_MCASTADDR_ENTRY mc; memset(mc.macAddress, 0x0FF, 6); mc.mcastFwdState=3; mc.portMask=1; mc.superEnable=0; CSL_CPSW_3GF_setAleMcastAddrEntry(0, &mc); CSL_CPSW_3GF_ALE_UNICASTADDR_ENTRY ucastAddrCfg; ucastAddrCfg.ucastType = ALE_UCASTTYPE_UCAST_NOAGE; // Add a permanent unicast address entryALE_UCASTTYPE_UCAST_NOAGE. ucastAddrCfg.secureEnable = FALSE; ucastAddrCfg.blockEnable = FALSE; ucastAddrCfg.portNumber = 0; // Add the ALE entry for this port memcpy(ucastAddrCfg.macAddress, &bsp_c66_eth_drv_mac_adressess[1].slices[0], 6); // Set the MAC address 1 CSL_CPSW_3GF_setAleUnicastAddrEntry(1, &ucastAddrCfg); ucastAddrCfg.portNumber = 0; // Add the ALE entry for this port memcpy(ucastAddrCfg.macAddress, &bsp_c66_eth_drv_mac_adressess[2].slices[0], 6); // Set the MAC address 2 CSL_CPSW_3GF_setAleUnicastAddrEntry(2, &ucastAddrCfg);
Any suggestion?
Thanks