Tool/software:
Hello,
I am attempting to add a unicast address to the CPSW on the R5F core with my own FreeRTOS port. But it seems that when I use CPSW_ALE_IOCTL_ADD_UCAST, and I attempt to send a packet over PHY loopback, the packet is never received. It seems that the only thing we ever can receive is broadcast MAC packets...
Am I missing something with the ALE configuration? Interestingly I do not have the same issues with CPSW_ALE_IOCTL_ADD_MCAST. I am able to send and receive over the PHY loopback when adding MCAST mac addresses.
Here is my code for adding unicast mac addresses:
CpswAle_SetUcastEntryInArgs setUcastInArgs; uint32_t entryIdx = 0; /* ALE entry with "secure" bit cleared is required for loopback */ setUcastInArgs.addr.vlanId = 0U; setUcastInArgs.info.portNum = CPSW_ALE_HOST_PORT_NUM; setUcastInArgs.info.blocked = false; setUcastInArgs.info.secure = false; setUcastInArgs.info.super = false; setUcastInArgs.info.ageable = false; setUcastInArgs.info.trunk = false; memcpy(&(setUcastInArgs.addr.addr[0]), macAddress.begin(), 6); prms.inArgs = &setUcastInArgs; prms.inArgsSize = sizeof(&setUcastInArgs); prms.outArgs = &entryIdx; prms.outArgsSize = sizeof(&entryIdx); esac::ThrowIf(Enet_ioctl(hEnet, cpswCfg.resCfg.selfCoreId, CPSW_ALE_IOCTL_ADD_UCAST, &prms) != ENET_SOK, code::StatusCode::FAILURE);
Thanks,
Ben