This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM6548:CPSW 使用 PHY 环回添加单播地址

Guru**** 1947850 points
Other Parts Discussed in Thread: AM6548, AM6442
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1378881/am6548-cpsw-add-unicast-address-with-phy-loopback

器件型号:AM6548

工具与软件:

您好!

我正在尝试使用我自己的 FreeRTOS 端口向 R5F 内核上的 CPSW 添加单播地址。 但是、当我使用 CPSW_ALE_IOCTL_ADD_UCAST 并尝试通过 PHY 环回发送数据包时、似乎从未接收到该数据包。 似乎我们只能接收到广播 MAC 数据包...

ALE 配置是否缺少一些内容? 有趣的是、我的 CPSW_ALE_IOCTL_ADD_MCAST 没有相同的问题。 当添加 MCAST Mac 地址时、我可以通过 PHY 环回发送和接收。

下面是我添加单播 MAC 地址的代码:

                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);

谢谢!