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.

[参考译文] TDA4VM:在 SDKL/SDKR 8.2中、9G 开关未激活

Guru**** 2472530 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2

器件型号:TDA4VM

我们正在尝试让2G 9G 交换机在定制硬件上工作。 根据 TI 客户支持的建议、我们升级到了 SDKL/SDKR 8.2、我完成了设置、包括移植器件树以实现定制硬件。 遗憾的是、8.2 SDK 的设置尚未达到7.2

 

  1. 我没有成功配置 ethfw 的静态 IP 地址–它仍然会对 DHCP 请求产生问题。 我尝试执行此配置的方法是在中
    1. vision_apps/platform/j721e/rtos/BIOS_cfg/ndk.cfg
    2. ethfw/apps/app_remotesmifcfg_server_mcu_2_0/main.c


哪种方法是正确的?

  1. 在 enet_appboardutils_j721e_evm.c 中、我尝试将 enetAppUtils_print()的日志重定向到 WAKEUP UART、就像它在以前的版本中正常工作一样–它现在不起作用–为什么?
  2. 在之前的版本中、我可以通过看到打印输出
    appLogPrintf ("\nCPSW NIMU 应用程序、IP 地址 I/F 1:%s\n\r\n、ipaddr);
    我在8.2设置中看不到这一点

 

对于上述症状、您的专家可以猜测、我们缺少哪些配置? 我们很乐意根据要求提供任何日志。

 

我们使用的是默认配置 FreeRTOS、您是否建议改用 tirtos? 我该怎么做?

ethfw_build_flags.mak 中的以下3个参数如何工作? 请您注意。 指向相关文档?

#构建仅 TI-RTOS 的二进制文件

Build_app_TIRTOS?=否

#构建仅 FreeRTOS 二进制文件

build_app_freertos?=是

#构建 TI-RTOS + Linux 二进制文件

Build_app_TIRTOS_Linux?=否

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Stanley、

    您是否找到了查看该内容的时间?

    此致、
    Bernd

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    请继续使用 FreeRTOS。

    您是从 VISION_APPS 还是 EthFW 构建 MCU2_0固件?

    如果是采用 FreeRTOS 的 VISION_APPS、则应在~/VISION_APps/utils/ethfw/src/app_ethfw_freertos.c 中启用静态 IP。

    如果是具有 FreeRTOS 的 EthFW、则应在~/ethfw/apps/app_remoteswitchcfg_server/mcu2_0/main.c.中启用静态 IP

    将 ETHAPP_LWIP_USE_DHCP 设置为0以启用静态 IP。

    此致、
    斯坦利

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的斯坦利:

    感谢您的回复!

    1.将继续使用 FreeRTOS

    2. 不确定是否要从 vision_apps 或 ethfw 构建 MCU2_0固件-这是/或情况?

    2.1. 在代码库(SDK7.2)中、我继承了 在 vision_apps/apps/basic_demos/app_tirtos_QNX/中添加的代码(用于 MCU1_0、MCU2_0、MCU2_1)、因此我将这些代码(a)移至 vision_apps/basic_demos/app_tirtos/apps/vision_tirtos/tirtos_qnx/tirtos_qnx/tirtos  vision/vision_apps/vision/tirtirtos/vision_apps/vision_apps/ tirtos/tirtos/tos/tirtirtos/tos/tirtos/tos_    
    这些代码与设置远程服务有关-我们认为9G 交换机需要这些代码吗? 我目前正在努力使这些工作成为一项工作、因为它们是为 TIRTOS 设计的。

    2.2.但是:在之前的 SDK7.2版本中,我在运行上面提到的由  appLogPrintf ("\nCPSW NIMU 应用程序、IP 地址 I/F 1:%s\n\r\n、ipaddr)输出的消息时看到; 由 EthFwCallbacks_ipAddrHookFxn ()或 IpAddrHFxn ()打印。

    我获得的代码中可能存在不兼容的匹配组合? (适用于 QNX)。 那么、如何在定制板上启用9G 开关应该在 SDK8.2中工作?

    4.这是一个新问题,在重构 TIRTOS -> FreeRTOS 时会弹出:我需要 #include ,这立即要求我 #include "FreeRTOSConfig.h"。如何正常选择与相应内核(R5F、C6x、C7x...)相关的 FreeRTOSConfig.h 通常要处理的是什么?

    请 帮助我进行排序、最佳 Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我已经验证了用途是用例 ethfw/apps/

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    进一步分析:
    与其他  CPSWng_virt_Mac -> DT 绑定、我们已验证 DT 在有关 cpsw9g_virt_Mac 的问题上是否正确
    我们已验证 DT 是否已正确加载(/proc/device_tree)

    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/
    compatible      dma-coherent    dma-names       dmas            name            phandle         ti,psil-base    ti,remote-name  virt_emac_port/
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/name
    main-r5fss-cpsw9g-virt-mac1
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/ti,remote-name
    mpu_1_0_ethmac-device-1
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/compatible
    ti,j721e-cpsw-virt-mac
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/virt_emac_port/
    name      ti,label
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/
    compatible      dma-coherent    dma-names       dmas            name            phandle         ti,psil-base    ti,remote-name  virt_emac_port/
    root@j7-evm:/proc/device-tree# cat main-r5fss-cpsw9g-virt-mac1/name
    main-r5fss-cpsw9g-virt-mac1
    root@j7-evm:/proc/device-tree#
    

    我们尝试按照上述链接中所述手动调制驱动程序-一切看起来都正常。
    根据9G、我们应该会看到两个 eth 设备-我们不会这样做
    我们不会从驱动器获得任何输出、无论是正还是负

    lsmod 表演

    root@j7-evm:# lsmod | grep cpsw
    ti_j721e_cpsw_virt_mac   327680  0
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我必须更正此语句:调用来自 vision_apps/utils/ethfw,然后在 ethfw/ethfw/src/ethfw.c 中调用 EthFw_init()

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我添加了 Linux 启动日志:
    e2e.ti.com/.../MobaXterm_5F00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220714_5F00_210031.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    此外、添加 MCU2_0日志-以前导">>>>>开始的任何内容 "是我的调试日志:

    e2e.ti.com/.../MobaXterm_5F00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220714_5F00_213230.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在我们的调用之后、我禁用了连接到 app_ethfw_freertos.c 中 PHY 的所有 CPSW9G 端口:

    static Enet_MacPort gEthAppPorts[] =
    {
    //    ENET_MAC_PORT_1, /* RGMII to PHY */
    //    ENET_MAC_PORT_2, /* RMII to PHY  */
        ENET_MAC_PORT_3, /* MAC to MAC   */
    //    ENET_MAC_PORT_4, /* RMII to PHY  */
        ENET_MAC_PORT_5, /* MAC to MAC   */
    //    ENET_MAC_PORT_6, /* RGMII to PHY */
    };
    
    static EthFw_VirtPortCfg gEthApp_virtPortCfg[] =
    {
        {
            .remoteCoreId = IPC_MPU1_0,
            .portId       = ETHREMOTECFG_SWITCH_PORT_0,
        },
    };

    结果、MCU2_0仍会记录状态、即

    [MCU2_0] 12.706668 s:PHY 0处于活动状态
    [MCU2_0] 12.706715 s:PHY 3处于活动状态

    与 SDKR7.2日志中看到的相同

    2.尝试找出 MCU2_0 FW 被挂起的位置、我发现以下几点:

    -从 vision_apps/utils/ethfw/src/app_ethfw_freertos.c 函数 appEthFwInit()开始,我们将调用链,永远不会返回:
    - vision_apps/utils/ethfw/src/app_ethfw_freertos.c:appEthFwInit()-> EthApp_initEthFw()-> EthFw_init()
    -ethfw/ethfw/src/ethfw.c:EthFw_init()-> EthFw_initMcm()-> EnetMcm_init()、EnetMcm_getCmdIf ()、EnetMcm_acquireHandleInfo()
    - pdk_jacinto_08_02_00_21/packages/ti/drv/enet/examples/utils/enet_mcm.c:EnetMcm_acquireHandleInfo()正处于阻塞状态。 好的

    void EnetMcm_acquireHandleInfo(const EnetMcm_CmdIf *hMcmCmdIf,
                                   EnetMcm_HandleInfo *handleInfo)
    {
        EnetMcm_mailboxObj msg;
    
        memset(&msg, 0, sizeof(msg));
        msg.cmd = MCM_GET_HANDLE;
        if ((hMcmCmdIf != NULL) && (handleInfo != NULL))
        {
            MailboxP_post(hMcmCmdIf->hMboxCmd, &msg, SemaphoreP_WAIT_FOREVER);
            MailboxP_pend(hMcmCmdIf->hMboxResponse, &msg, SemaphoreP_WAIT_FOREVER);
            EnetAppUtils_assert(msg.cmd == MCM_RESPONSE_GET_HANDLE);
    
            *handleInfo = msg.msgBody.handleInfo;
        }
        else
        {
            EnetAppUtils_assert(false);
        }
    }
    

    有趣的是、这是哪个条件、哪个条件从未被断言

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    --重要更新----

    1.我在 修改代码时发现了一个非常重要的错误(缺少一个断点->掉下来断言语句,在上面的 Linux 启动日志的第621行中可见)

    2.此错误修复了我在 /home/schandl/ti-processor-sdk-rtos-j721e-evm-08_02_00_05/ethfw/ethfw/src/ethfw.c 中运行的断言:断言@行:1013

    int32_t EthFw_initRemoteConfig(EthFw_Handle hEthFw)
    {
        CpswProxyServer_Config_t cfg;
        int32_t status;
        uint32_t i;
    
        EnetAppUtils_assert(hEthFw != NULL);
    
        /* Initialize Proxy Server */
        memset(&cfg, 0, sizeof(cfg));
        cfg.getMcmCmdIfCb = &EthFw_getMcmCmdIfCb;
        cfg.initEthfwDeviceDataCb = &EthFw_getDeviceData;
        cfg.notifyCb = &EthFw_handleProfileInfoNotify;
        cfg.rpmsgEndPointId = REMOTE_DEVICE_ENDPT;
    
        /* Enable MAC ports */
        cfg.numMacPorts = gEthFwObj.numPorts;
        for (i = 0U; i < cfg.numMacPorts; i++)
        {
            cfg.macPort[i] = gEthFwObj.ports[i].macPort;
        }
    
        /* Remote cores which use remote_device framework */
        cfg.numVirtPorts = gEthFwObj.numVirtPorts;
        for (i = 0U; i < cfg.numVirtPorts; i++)
        {
            cfg.virtPortCfg[i].remoteCoreId = gEthFwObj.virtPortCfg[i].remoteCoreId;
            cfg.virtPortCfg[i].portId       = gEthFwObj.virtPortCfg[i].portId;
        }
    
        /* AUTOSAR core */
        EnetAppUtils_assert(gEthFwObj.numAutosarVirtPorts == 1);
        cfg.autosarEthDriverRemoteCoreId = gEthFwObj.autosarVirtPortCfg[0].remoteCoreId;
        cfg.autosarEthDriverVirtPort     = gEthFwObj.autosarVirtPortCfg[0].portId;
        cfg.autosarEthDeviceEndPointId   = AUTOSAR_ETHDRIVER_DEVICE_ENDPT;
    
        /* Enable server-to-client notify service */
        cfg.notifyServiceCpswType = gEthFwObj.enetType;
        cfg.notifyServiceRemoteCoreId[0] = IPC_MPU1_0;
        cfg.notifyServiceRemoteCoreId[1] = IPC_MCU2_1;
    
        /* Set CPSW Proxy shared multicast config.
         * All parameters have already been checked. */
        cfg.sharedMcastCfg.filterAddMacSharedCb = (CpswProxyServer_FilterAddMacSharedCb)gEthFwObj.sharedMcastCfg.filterAddMacSharedCb;
        cfg.sharedMcastCfg.filterDelMacSharedCb = (CpswProxyServer_FilterDelMacSharedCb)gEthFwObj.sharedMcastCfg.filterDelMacSharedCb;
        cfg.sharedMcastCfg.numMacAddr = gEthFwObj.sharedMcastCfg.numMacAddr;
        memcpy(&cfg.sharedMcastCfg.macAddrList[0U][0U],
               &gEthFwObj.sharedMcastCfg.macAddrList[0U][0U],
               cfg.sharedMcastCfg.numMacAddr * ENET_MAC_ADDR_LEN);
    
        /* Set CPSW Proxy reserved multicast config */
        cfg.rsvdMcastCfg.numMacAddr = gEthFwObj.rsvdMcastCfg.numMacAddr;
        memcpy(&cfg.rsvdMcastCfg.macAddrList[0U][0U],
               &gEthFwObj.rsvdMcastCfg.macAddrList[0U][0U],
               cfg.rsvdMcastCfg.numMacAddr * ENET_MAC_ADDR_LEN);
    
        cfg.dfltVlanIdMacOnlyPorts = gEthFwObj.dfltVlanIdMacOnlyPorts;
        cfg.dfltVlanIdSwitchPorts  = gEthFwObj.dfltVlanIdSwitchPorts;
    
        status = CpswProxyServer_init(&cfg);
        if (status != ENET_SOK)
        {
            appLogPrintf("EthFw_initRemoteConfig() failed to init CPSW Proxy: %d\n", status);
        }
    
        /* Start Proxy Server */
        if (status == ENET_SOK)
        {
            status = CpswProxyServer_start();
            if (status != ENET_SOK)
            {
                appLogPrintf("EthFw_initRemoteConfig() failed to start CPSW Proxy: %d\n", status);
            }
        }
    
        return status;
    }
    


    正如我们在现场会议上商定的、我们包括了一个空 的 gEthApp_autosarVirtPortCfg[]
    static EthFw_VirtPortCfg gEthApp_autosarVirtPortCfg[] =
    {
    };

    因此、如果给出断言语句、这将不起作用。 如何最好地解决他的问题?

    请 建议!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    附加启动日志的当前状态:

    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220718_5F00_113706.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    暂时删除自动核心声明周围的行

        /* AUTOSAR core */
    //    EnetAppUtils_assert(gEthFwObj.numAutosarVirtPorts == 1);
    //    cfg.autosarEthDriverRemoteCoreId = gEthFwObj.autosarVirtPortCfg[0].remoteCoreId;
    //    cfg.autosarEthDriverVirtPort     = gEthFwObj.autosarVirtPortCfg[0].portId;
    //    cfg.autosarEthDeviceEndPointId   = AUTOSAR_ETHDRIVER_DEVICE_ENDPT;

    MCU2_0固件继续运行,现在在断言时失败 @行:enet_mcm.c 中的1381:MSG.cmd =MCM _ RESPONSE_CORE_Attach:失败!!
    void EnetMcm_coreAttach(const EnetMcm_CmdIf *hMcmCmdIf,
                            uint32_t coreId,
                            EnetPer_AttachCoreOutArgs *attachInfo)
    {
        EnetMcm_mailboxObj msg;
    
        memset(&msg, 0, sizeof(msg));
        if ((hMcmCmdIf != NULL) && (attachInfo != NULL))
        {
            msg.cmd            = MCM_CORE_ATTACH;
            msg.msgBody.coreId = coreId;
    
            MailboxP_post(hMcmCmdIf->hMboxCmd, &msg, SemaphoreP_WAIT_FOREVER);
            MailboxP_pend(hMcmCmdIf->hMboxResponse, &msg, SemaphoreP_WAIT_FOREVER);
            EnetAppUtils_assert(msg.cmd == MCM_RESPONSE_CORE_ATTACH);
            *attachInfo = msg.msgBody.attachInfo;
        }
        else
        {
            EnetAppUtils_assert(false);
        }
    }


    该误差表示什么?

    我再次附上改进的日志
    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220718_5F00_140014.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    更多详细调试:

    在 RTOS 日志中、我们看到:

    EnetAppUtils_allocTxCh() failed: -3
    EnetAppUtils_allocRxFlow() failed : -3
    Assertion @ Line: 445 in enet_udmautils.c: ENET_SOK == status : failed !!!


    由于-3 = ENET_EINVALIDPARAMS、我打印了参数、例如 EnetAppUtils_allocTxCh()


    >>>>>>>>>>> EnetAppUils_openTxCh(): calling EnetAppUtils_allocTxCh(HostId:3,Handle:a38bdc7c,CoreKey:0)
    

    哪些参数看起来有问题?


    在 Linux 日志中、我们看到:

    [ 6.734314] j721e-cpsw-virt-mac main_r5fss_scpsw9g_virt_mac0: rpmsg attach - fail -5
    [ 6.743680] j721e-cpsw-virt-mac: probe of main_r5fss_cpsw9g_virrt_mac0 failed with error -5


    驱动程序中的进一步调试:
    >>>>>>>>>>>> j721e-cpsw-virt-mac->probe(main_r5fss_cpsw9g_virt_mac0) returns -5

    这在函数 virt_cpsw_nuss_rdev_init ()中 j721e-cpsw-virt-mac.c 的第1302行中
    ret = common->rdev_switch_ops->attach_ext(common->rdev, &attach_info);
    if (ret) {
    dev_err(dev, "rpmsg attach - fail %d\n", ret);
    return ret;
    }

    它本身就是对 rpmsg_kdrv_switch_attach_ext()的调用
    rpmsg-kdrv/rpmsg_kdrv_switch.c 的第162行中

    这意味着我们是与所需"健康"信息相距的一行代码!!!

    dev_err(dev, "rpmsg attach_ext - rx_mtu:%d features:%08X tx_mtu[0]:%d flow_idx:%d tx_cpsw_psil_dst_id:%d mac_addr:%pM mac-only:%d\n", . . . );

    我们认为 Linux 错误是 RTOS 错误的后果。

    与之前的">>>>>>相同 "标记我的调试日志。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    结果:这是另一种方法-由于  rpmsg_kdrv_switch_attach_ext()提早退出-  rpmsg_kdrv_send_request_with _response ()失败,因此未设置 core_key。 core_key=0导致 RTOS 故障。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    更新:

    1.我在尝试修复断言时引入了一个错误

    Assertion @ Line: 1381 in enet_mcm.c: msg.cmd == MCM_RESPONSE_CORE_ATTACH : failed !!!
    

    有时会出现这种情况。 (仍然不知道导致此断言错误的原因)

    2.修复了上面的错误-我们得到了对应于9G 开关的器件 eth1

    3.但仍然没有 ping!

    一些观察结果(我附上现有日志):

    1.在尝试 为 MC 地址 33:33:ff:1D:92:C1设置 CpswProxyServer_filterAddMacHandlerCb()时,设备事务失败,-14 = efault (坏地址)-当我将  EthApp_SharedMcastAddrTable 中的 MC 地址更改为 33:33:ff:1D:92:  C1:70:76:1时,该错误与 MAC 地址不匹配。

    2、 地址错误也适用于33:33:00:00:fb、 33:33:00:01:00:03、之前的错误不在  EthApp_SharedMcastAddrTable 中找到

    3. 对于 MC 地址01:80:C2:00:00:0e、打印错误"Reserved mcast cannot be added to filter"

    4. eth0上的 tcpdump:

    root@j7-evm:~# tcpdump -i eth0
    [   46.895247] device eth0 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    20:51:11.960883 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:12.090130 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 000f  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:12.300115 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0010  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:12.510136 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0011  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:13.140940 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:14.842490 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:19.041032 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:20.720113 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0012  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:20.930123 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0013  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:21.006014 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:21.140161 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0014  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:22.201075 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:27.306117 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:28.301109 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:29.350103 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0015  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:29.560129 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0016  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:29.770103 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0017  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:30.142694 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:30.790288 IP6 j7-evm > ip6-allrouters: ICMP6, router solicitation, length 16
    20:51:34.201198 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:34.531138 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:76:25:98:19:b7 (oui Unknown), length 288
    20:51:34.931452 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 70:ff:76:1d:92:c1 (oui Unknown), length 288
    20:51:36.356251 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:37.521278 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    20:51:37.980118 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0018  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:38.190112 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 0019  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:38.400117 70:ff:76:1d:92:c2 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype 802.1Q (0x8100), length 72:
            0x0000:  0202 0036 0000 7c00 0000 0000 0000 0000  ...6..|.........
            0x0010:  0000 0000 70ff 76ff fe1d 92c2 0003 001a  ....p.v.........
            0x0020:  057f 0000 0000 0000 0000 0000 0000 0000  ................
            0x0030:  0000 0000 0000                           ......
    20:51:42.656331 ARP, Request who-has 192.168.1.70 (Broadcast) tell 192.168.1.50, length 46
    20:51:43.463309 ARP, Request who-has 192.168.1.40 (Broadcast) tell 192.168.1.50, length 46
    ^C
    29 packets captured
    29 packets received by filter
    0 packets [   83.010479] device eth0 left promiscuous mode
    dropped by kernel
    12 packets dropped by interface
    root@j7-evm:~#
    

    a.来自 eth0、eth1的 DHCP 请求
    b.可以查看 Aurix 的 ARP 请求(192.158.1.50)
    c.将192.168.1.70分配给 eth1时、Aurix 不会为此地址进行 ARP

    5. eth1上的 tcpdump:

    root@j7-evm:~# tcpdump -i eth1
    [ 1574.751640] device eth1 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
    21:16:58.448910 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:16:58.451134 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    21:16:59.448455 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:16:59.452908 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    21:17:13.994337 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 70:ff:76:1d:92:c1 (oui Unknown), length 288
    21:17:40.520622 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:17:40.521850 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    21:17:41.520859 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:17:41.522110 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    21:17:57.375438 IP6 fe80::4ac2:c03a:dad4:6265.mdns > ff02::fb.mdns: 0 [7q] PTR (QM)? _ftp._tcp.local. PTR (QM)? _nfs._tcp.local. PTR (QM)? _afpovertcp._tcp.local. PTR (QM)? _smb._tcp.local. PTR (QM)? _sftp-ssh._tcp.local. PTR (QM)? _webdavs._tcp.local. PTR (QM)? _webdav._tcp.local. (118)
    21:18:18.617463 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 70:ff:76:1d:92:c1 (oui Unknown), length 288
    21:18:22.625310 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:18:22.629208 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    21:18:23.624543 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 A (QM)? DS1.local. (27)
    21:18:23.628051 IP6 fe80::488a:b322:1cf5:ee4f.mdns > ff02::fb.mdns: 0 AAAA (QM)? DS1.local. (27)
    ^C
    

    来自 eth1的 DHCP 请求?

    在我看来、IPv4 / IPv6的混合看起来并不健康?

    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220725_5F00_065948.txt

    请 建议!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    更新:

    目前的状况

    1. enet_mcm.c 中的断言

    Assertion @ Line: 1381 in enet_mcm.c: msg.cmd == MCM_RESPONSE_CORE_ATTACH : failed !!!

    似乎与 MCM 不具有线程安全性相关、因此无法将响应正确分配给请求者。  修复上述问题后、我可靠地获取 eth0和 eth1、并可以进行以下观察:
    2. Ping 仍然只能从 CON13到 Aurix (@ 192.168.1.50)、而不能从 eth0 (192.168.1.77)或 eth1 (192.168.1.70)运行。
    3.没有从 eth0 ping eth1或 Aurix。 从 eth1到 eth0和 Aurix 均无 Ping
    但是 ssh 可以从 eth0连接到 eth1,也可以从 eth1连接到 eth0
    5.我可以在 eth0上的 tcpdump 中看到 ARP 请求和应答。 ARP 请求由 eth0回复
    6. ARP 请求由 eth1回复,但在 eth1上的 tcpdump 中看不到
    7.如果我在 eth1添加相应的 IGMP 成员身份
    ip maddr add 01:00:5e:00:00:01 dev eth1
    ip maddr add 01:00:5e:00:00:05 dev eth1
    ip maddr add 01:00:5e:00:00:08 dev eth1
    ip maddr add 01:00:5e:00:00:09 dev eth1
    ip maddr add 01:00:5e:00:00:0f dev eth1
    ip maddr add 01:00:5e:00:00:10 dev eth1
    ip maddr add 01:00:5e:00:00:13 dev eth1
    ip maddr add 01:00:5e:00:00:18 dev eth1
    ip maddr add 01:00:5e:00:00:19 dev eth1
    ip maddr add 01:00:5e:00:00:1b dev eth1
    ip maddr add 01:00:5e:00:00:1c dev eth1
    ip maddr add 01:00:5e:00:00:1d dev eth1
    我可以接收 Aurix 在 Eth0的这些地址发送(始终)的 UP-MC
    20:54:54.373495 IP 192.168.1.50.50050 > 239.0.0.5.50011: UDP, length 458
    20:54:54.373538 IP 192.168.1.50.50050 > 239.0.0.8.50011: UDP, length 9
    20:54:54.373592 IP 192.168.1.50.50050 > 239.0.0.28.50011: UDP, length 16
    20:54:54.383296 IP 192.168.1.50.50050 > 239.0.0.16.50011: UDP, length 7
    20:54:54.383349 IP 192.168.1.50.50050 > 239.0.0.19.50011: UDP, length 12
    20:54:54.383402 IP 192.168.1.50.50050 > 239.0.0.29.50011: UDP, length 9
    20:54:54.383492 IP 192.168.1.50.50050 > 239.0.0.5.50011: UDP, length 458
    20:54:54.383577 IP 192.168.1.50.50050 > 239.0.0.15.50011: UDP, length 517
    20:54:54.383618 IP 192.168.1.50.50050 > 239.0.0.9.50011: UDP, length 9
    20:54:54.393295 IP 192.168.1.50.50050 > 239.0.0.16.50011: UDP, length 7
    20:54:54.393349 IP 192.168.1.50.50050 > 239.0.0.19.50011: UDP, length 12
    20:54:54.393401 IP 192.168.1.50.50050 > 239.0.0.29.50011: UDP, length 9
    20:54:54.393491 IP 192.168.1.50.50050 > 239.0.0.5.50011: UDP, length 458
    20:54:54.393537 IP 192.168.1.50.50050 > 239.0.0.8.50011: UDP, length 9
    20:54:54.393592 IP 192.168.1.50.50050 > 239.0.0.27.50011: UDP, length 39
    以及 eth1。
    8. 如果我在 eth0上添加了相应的 IGMP 成员身份,则在任何一个 I/F 上都不会收到 UP-MC
    9.无法从 CON13进行 ssh
     
    ping 不起作用,但 ssh 却起作用,这似乎很奇怪。 添加 MC 地址似乎将9G 交换机配置为 r.t MC、eth0、eth1的端点默认情况下似乎启用 MC。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Stefan、

    我看不到 MCM 中如何发生此错误。 能否检查从 MCM serverTask 返回的 msg.cmd 的实际值?

    删除 AUTOSAR 远程信息是否会触发此问题? 如果是、我可以尝试在 TI EVM 上重现它。

        /* AUTOSAR core */
    //    EnetAppUtils_assert(gEthFwObj.numAutosarVirtPorts == 1);
    //    cfg.autosarEthDriverRemoteCoreId = gEthFwObj.autosarVirtPortCfg[0].remoteCoreId;
    //    cfg.autosarEthDriverVirtPort     = gEthFwObj.autosarVirtPortCfg[0].portId;
    //    cfg.autosarEthDeviceEndPointId   = AUTOSAR_ETHDRIVER_DEVICE_ENDPT;

    -misa

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Misael:
    您提到的 MCM 错误确认 MCM_RESPONSE_CORE_ATTON? 这是因为 MCM 中邮箱的使用不是线程安全的。 您可以在该日志中观察它的发生情况(在[MCU2_0]中使用">>>>>>查看我的调试消息 EnetMcm……e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220728_5F00_115253.txt

    我认为它没有优先复制它、因为我修补了它

    请 而是结合我们的以太网拓扑查看我的最新博文(一些以太网工作- ARP、SSH、其他不工作)。 我想现在只有9G 交换机的配置错误或配置缺失? 9G 开关和 SJA1105开关之间的链路?。 由 Aurix 发布的 UDP 多播帧似乎无处不在-也是 ARP 请求-为什么 ping 不起作用?

    我还附上了补丁的日志、其中一些以太网开始显示。 您能发现任何可疑情况吗? 缺少什么?

     e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220727_5F00_094026.txt

    非常感谢您的支持-感谢 Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    已交换上述附件

    [引用 userid="491633" URL"~/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2/4160653 #4160653"] SDK8_2-TDA4_MAIN_RS232_20220727_094026.txt[/quot]

     是邮箱问题版本的日志

    [引用 userid="491633" URL"~/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2/4160653#4160653"]TDA4_MAIN_RS232_20220728_115253.txt
    [/报价]

    是当前状态的日志、其中一些以太网功能起作用

    抱歉...

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Stefan、

    [引用 userid="491633" URL"~/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2/4160653 #4160653"]一些以太网工作- ARP、SSH、其他不工作

    您是否在 Linux 端运行 TAP 应用程序? 如果没有、请尝试在 ethfw_build_flags.mk 中设置以下构建标志:

    ETHFW_INTERCORE_ETH_support=no
    ETHFW_PROXY ARP_SUPPINT=yes

    我不确定 ARP 是如何为您工作的、因为 ARP 请求数据包(已广播)仅转发到 ETHFW。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Misael:

    1.我是否正在运行 TAP 应用程序? t.b.h 我不知道、但鉴于我不知道这是什么、如果它不是默认运行、我想-不是

    2.在中设置构建标志

    ETHFW_INTERCORE_ETH_support=yes
    ETHFW_PROXY ARP_SUPPINT=yes

    因此、我也尝试 了 ETHFW_INTERCORE_ETH_support=no 处的设置。 扰流板:它不会产生任何影响。 答复总是按给出
    192.168.1.70 / 24:76:25:98:19:B7
    无论此 IP 地址是否设置为 eth0

    root@j7-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.70  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::2676:25ff:fe98:19b7  prefixlen 64  scopeid 0x20<link>
            ether 24:76:25:98:19:b7  txqueuelen 1000  (Ethernet)
            RX packets 2842  bytes 503969 (492.1 KiB)
            RX errors 0  dropped 12  overruns 0  frame 0
            TX packets 34  bytes 5476 (5.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.71  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::72ff:76ff:fe1d:92c1  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c1  txqueuelen 1000  (Ethernet)
            RX packets 2811  bytes 500393 (488.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 34  bytes 5476 (5.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@j7-evm:~# tcpdump -i eth0 -n arp
    [   60.267221] device eth0 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    20:51:22.054475 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:27.159505 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:27.159539 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28
    20:51:28.154507 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:29.996100 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:29.996130 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28

    或 eth1
    root@j7-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.71  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::2676:25ff:fe98:19b7  prefixlen 64  scopeid 0x20<link>
            ether 24:76:25:98:19:b7  txqueuelen 1000  (Ethernet)
            RX packets 4010  bytes 710761 (694.1 KiB)
            RX errors 0  dropped 12  overruns 0  frame 0
            TX packets 35  bytes 5518 (5.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.70  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::72ff:76ff:fe1d:92c1  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c1  txqueuelen 1000  (Ethernet)
            RX packets 3977  bytes 707065 (690.4 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 34  bytes 5476 (5.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@j7-evm:~# tcpdump -i eth0 -n arp
    [   64.064031] device eth0 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    20:51:27.200055 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:27.200091 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28
    20:51:28.195059 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:30.036643 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:30.036673 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28
    20:51:34.095127 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46

    我从未在"tcpdump -i eth1 -n arp"中看到 ARP 数据包。 由于 Aurix 不会停止192.168.1.70的 ARPing、因此似乎没有收到 ARP 回复。

    出于好奇、我尝试将 eth0和 eth1设置到由 Aurix 进行 ARPed 的这两个地址、并将这两个地址都作为在同一设备上分配的地址:

    root@j7-evm:~# ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.40  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::2676:25ff:fe98:19b7  prefixlen 64  scopeid 0x20<link>
            ether 24:76:25:98:19:b7  txqueuelen 1000  (Ethernet)
            RX packets 2551  bytes 452966 (442.3 KiB)
            RX errors 0  dropped 9  overruns 0  frame 0
            TX packets 33  bytes 5118 (4.9 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet 192.168.1.70  netmask 255.255.255.0  broadcast 192.168.1.255
            inet6 fe80::72ff:76ff:fe1d:92c1  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c1  txqueuelen 1000  (Ethernet)
            RX packets 2527  bytes 450104 (439.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 32  bytes 5076 (4.9 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@j7-evm:~# tcpdump -i eth0 -n arp
    [   58.683999] device eth0 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    20:51:20.804956 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:20.804991 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28
    20:51:21.999991 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:22.000027 ARP, Reply 192.168.1.40 is-at 24:76:25:98:19:b7, length 28
    20:51:27.105034 ARP, Request who-has 192.168.1.70 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:27.105070 ARP, Reply 192.168.1.70 is-at 24:76:25:98:19:b7, length 28
    20:51:28.100033 ARP, Request who-has 192.168.1.40 (ff:ff:ff:ff:ff:ff) tell 192.168.1.50, length 46
    20:51:28.100062 ARP, Reply 192.168.1.40 is-at 24:76:25:98:19:b7, length 28

     

    以前、我似乎记得、Aurix 收到 ARP 回复、因为我(当时)在 TDA4中观察到他们的接收的唯一方式 是看到 Aurix 发出的 ARP 请求在192.168.1.70停止。 我无法再观察到这一点了...

    Best Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Stefan、

    在   Linux 端运行 tcpdump -i eth1 -n arp 时、预计不会看到 ARP 请求数据包。 ARP 请求数据包由 ETHFW 代表 已注册 MAC 地址/IP 地址对的虚拟客户端进行处理。

    ETHFW_PROXY ANTI_ARP_SUPPTLAG 实际上会在 ETHFW 上启用 ARP 请求处理。  我建议您启用登录 /ethfw_callbacks/src/ethfw_callbacks_lwipif.c、并修改 ETHF_callbacks_debug、如下所示:

    /* If defined, enables ARP packet handle function debug prints */
    #define ETHFW_CALLBACKS_DEBUG
    

    BTW、 当 Linux 虚拟客户端向 ETHFW 注册其 IP 地址时、您应该会在 ETHFW 日志中看到如下所示的表:

    Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a2a5645c,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:192.168.1.193
    
     SNo.      IP Address          MAC Address   
    ------    -------------     -----------------
      1       192.168.1.193     70:ff:76:1d:92:c1

    我在您的任何日志中都没有看到这一点。 您能否确认它是否实际存在?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Misael、

    1.我添加了#define ETFW_callbacks_debug 并在此处附加日志


    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220802_5F00_072829.txt

    2.我已验证,在启用远程内核日志记录后分配 IP 地址时,我可以看到该行

    root@j7-evm:~# ./startup.sh
    [MCU2_0]    116.126656 s: Function:CpswProxyServer_registerIpv4MacHandlerCb,HostId:0,Handle:a3898cc4,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1 IPv4Addr:192.168.1.71
    [MCU2_0]    116.126839 s:
    [MCU2_0]  SNo.      IP Address          MAC Address
    [MCU2_0]    116.126883 s: ------    -------------     -----------------
    [MCU2_0]    116.126926 s:   1       192.168.1.71     70:ff:76:1d:92:c1
    

    在上面的日志中(我在这里删除了 ARP 日志)、其中
    root@j7-evm:~# cat startup.sh
    ip addr add 192.168.1.70/24 brd + dev eth0
    ./set-mc-eth0.sh
    ifconfig eth0 up
    ip addr add 192.168.1.71/24 brd + dev eth1
    ./set-mc-eth1.sh
    ifconfig eth1 up
    

    谢谢大家、Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    (笑声) 另一方面、如果我在 ETH1上设置192.168.1.70

    cat startup-alt.sh
    ip addr add 192.168.1.71/24 brd + dev eth0
    ./set-mc-eth0.sh
    ifconfig eth0 up
    ip addr add 192.168.1.70/24 brd + dev eth1
    ./set-mc-eth1.sh
    ifconfig eth1 up


    我们可以在日志中看到"已发送的 ARP 响应"。 我附加这些信息-但 Aurix 不会停止到 ARP 这一事实意味着 Aurix 不会收到回复、对吧?

    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220802_5F00_074627.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    --更新----

    1.我可以从 eth1 -> eth0以及 eth0 -> eth1发送 udp-MC 数据包,也可以在 tcpdump 中看到它们,但在连接到 CON13的 PC 上看不到它们。 我还不知道能否在 Aurix 收到这些信息、但我相信、不是

    2. CPSW9G 缺少某种配置? 当我在 eth1添加 Aurix 的 UP-MC 数据包(maddr add)时、我只能在 eth0接收这些数据包。 认为这是因为、在配置 eth1时、CPSW9G 也会接收一些 w.r.t 配置 MC

    vision_apps/utils/ethfw/src/app_ethfw_freertos.c  中 gEthApp_sharedMcastAddrTable[]的作用  

    /* Must not exceed ETHAPP_MAX_SHARED_MCAST_ADDR entries */
    static EthApp_SharedMcastAddrTable gEthApp_sharedMcastAddrTable[] =
    {
        {
            /* MCast IP ADDR: 224.0.0.1 */
            .macAddr = {0x01,0x00,0x5E,0x00,0x00,0x01},
            .portMask= 0U,
        },
        {
            /* MCast IP ADDR: 224.0.0.251 */
            .macAddr = {0x01,0x00,0x5E,0x00,0x00,0xFB},
            .portMask= 0U,
        },
        {
            /* MCast IP ADDR: 224.0.0.252 */
            .macAddr = {0x01,0x00,0x5E,0x00,0x00,0xFC},
            .portMask= 0U,
        },
        {
            .macAddr = {0x33,0x33,0x00,0x00,0x00,0x01},
            .portMask= 0U,
        },
        {
            .macAddr = {0x33,0x33,0xFF,0x1D,0x92,0xC2},
            .portMask= 0U,
        },
        {
            .macAddr = {0x01,0x80,0xC2,0x00,0x00,0x00},
            .portMask= 0U,
        },
        {
            .macAddr = {0x01,0x80,0xC2,0x00,0x00,0x03},
            .portMask= 0U,
        },
    };

    这是什么需要的? 示例代码中使用的值是什么? 它们是否应适应我们的项目?
    我还尝试增加常量 ETHAPP_MAX_SHARGE_MCAST_ADDR、但在其他地方产生了编译错误

    谢谢 + BEST Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Stefan、

    gEthApp_sharedMcastAddrTable 用于基于共享存储器的多播支持。 用户指南 的以下部分对此进行了介绍:https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/ethfw/docs/user_guide/ethfw_c_ug_top.html#ethfw_mcast_support

    请注意、禁用  ETHFW_INTERCORE_ETH_support 后、gEthApp_sharedMcastAddrTable 数组应不再相关。  禁用内核间支持后增大 ETHAPP_MAX_SHARGE_MCast_ADDR 应该 无效。

    =1=

    在实验1中、您将 eth0设置为.70、将 eth1设置为.71、由于 ARP 请求是针对.70 (eth0)、因此 ETHFW 没有代表 Linux 虚拟客户端进行响应是有意义的。

    =2=

    当 IP 地址 在 eth0和 eth1之间交换时、ETHFW 现在对应于对.70 (eth1)的 ARP 请求做出响应。

    ARP 请求应在响应后停止。

    =3=

    上次测试中使用的 MC 地址是已注册的还是未注册的? 换言之,您是否在 ALE 中为其明确添加了条目(这是注册的 MC)?

    [引用 userid="491633" URL"~/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2/4164417 #4164417"]2. CPSW9G 在某种程度上缺少某种配置? 当我在 eth1添加 Aurix 的 UP-MC 数据包(maddr add)时、我只能在 eth0接收这些数据包。 认为这是因为、在配置 eth1时、CPSW9G 也会接收一些 w.r.t 配置 mc [/报价]

    请您详细说明上述声明的第二部分("我在添加这些内容时...")?

    我想我们需要查看 ALE 表、检查 您是否已在表中添加了要测试的多播地址。 请尝试从 Linux 终端运行"ethtool -t eth1"。 这将在  视觉应用日志中转储 ALE 表和 CPSW 统计信息。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Misael、感谢您的解释、

    -1-

    澄清:我再次打开了 ETHFW_INTERCORE_ETH_support、因为它似乎没有任何影响。 我现在再次将其关闭。 这次在 ethfw/ethfw_build_flags.mak 和 vision_apps/vision_apps_build_flags.mak 中都有、我之前从未考虑过后者

    -2-

    与其他 MC 地址:"上次测试中使用的 MC 地址是已注册的还是未注册的?" 所以我没有注册 MC,除了运行

    ip maddr add 01:00:5e:00:00:05 dev eth1

    在 Linux 中。 这也是我所说的"当我添加这些内容时"。 最初、我添加了大量 MC 地址、Aurix 使用类似的脚本广播这些地址
    root@j7-evm:~# cat set-mc-eth1.sh
    ip maddr add 01:00:5e:00:00:01 dev eth1
    ip maddr add 01:00:5e:00:00:05 dev eth1
    ip maddr add 01:00:5e:00:00:08 dev eth1
    ip maddr add 01:00:5e:00:00:09 dev eth1
    ip maddr add 01:00:5e:00:00:0f dev eth1
    ip maddr add 01:00:5e:00:00:10 dev eth1
    ip maddr add 01:00:5e:00:00:13 dev eth1
    ip maddr add 01:00:5e:00:00:18 dev eth1
    ip maddr add 01:00:5e:00:00:19 dev eth1
    ip maddr add 01:00:5e:00:00:1b dev eth1
    ip maddr add 01:00:5e:00:00:1c dev eth1
    ip maddr add 01:00:5e:00:00:1d dev eth1

    同时添加 到 eth0和 eth1以对这些接收的 I/fs 进行子镜像。 不过,我发现,只有对 eth1这样做是必要和足够的,以便在 eth0和 eth1上接收这些 Mc。 这些地址是否也应该按照"添加到代码中"的含义进行注册? (之前我 假设  gEthApp_sharedMcastAddrTable 可能适合...)

    -3-

    在上面、我附上启动日志:
    e2e.ti.com/.../SDK8_5F00_2_2D00_startup_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220803_5F00_063018.txt

    还显示设置 IP 的脚本:

    root@j7-evm:~# cat startup.sh
    ip addr add 192.168.1.70/24 brd + dev eth0
    ./set-mc-eth0.sh
    ifconfig eth0 up
    ip addr add 192.168.1.71/24 brd + dev eth1
    ./set-mc-eth1.sh
    ifconfig eth1 up

    我会附加 ethtool 统计信息的日志
    e2e.ti.com/.../SDK8_5F00_2_2D00_ale_2D00_tables_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220803_5F00_063401.txt

    -4-

    gPTP 的地址如何、我还需要通过某种方式注册这些地址吗?

    -5-

    如果您认为有必要打电话、请。 不要犹豫-我想可能会这样

    T.i.a.和 BEST Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    --更新----

    -1-

    问题:

     pdk_jacinto_08_02_00_21/packages/ti/drv/enet/examples/utils/enet_board_j7xevm.c 中存在一组 MAC 地址 macAddrBuf[]。第一个地址将成为 eth1 I/fs MAC 地址。 第二个日志记录为

    [MCU2_0] 12.866786 s: Host MAC address: 70:ff:76:1d:92:c2

    它指的是哪个主机? 此主机正在发送 PTP 数据包?

    与相关

    [MCU2_0] 12.870807 s: Added interface 'ti1', IP is 192.168.1.200
    [MCU2_0] 12.883924 s: EthFw: TimeSync PTP enabled

    -2-

    观察结果:

    即使禁用了 ETHFW_INTERCORE_ETH_support、我也会发现在启动(附加日志)后(我的一侧没有任何进一步的手动配置)、仍会订阅一些 MC 地址:

    root@j7-evm:~# ip maddr show
    1: lo
    inet 224.0.0.1
    inet6 ff02::1
    inet6 ff01::1
    2: eth0
    link 33:33:00:00:00:01
    link 01:00:5e:00:00:01
    link 33:33:ff:98:19:b7
    link 01:80:c2:00:00:00
    link 01:80:c2:00:00:03
    link 01:80:c2:00:00:0e
    link 33:33:00:00:00:fb
    link 33:33:00:01:00:03
    inet 224.0.0.1
    inet6 ff02::1:3
    inet6 ff02::fb
    inet6 ff02::1:ff98:19b7
    inet6 ff02::1 users 2
    inet6 ff01::1
    3: eth1
    link 33:33:00:00:00:01 users 2
    link 01:00:5e:00:00:01 users 2
    link 33:33:ff:41:40:04 users 2
    link 01:80:c2:00:00:00 users 2
    link 01:80:c2:00:00:03 users 2
    link 01:80:c2:00:00:0e users 2
    link 33:33:00:00:00:fb users 2
    link 33:33:00:01:00:03 users 2
    inet 224.0.0.1
    inet6 ff02::1:3
    inet6 ff02::fb
    inet6 ff02::1:ff41:4004
    inet6 ff02::1 users 2
    inet6 ff01::1

    这在代码中的哪一个完成? 我似乎找不到 这个地方! -编辑:它们似乎与 ifconfig 相关/因此无需担心

    e2e.ti.com/.../SDK8_5F00_2_2D00_TDA4_5F00_MAIN_5F00_RS232_5F00_20220804_5F00_153738.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    --更新以太网拓扑以供讨论

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    斯坦利

    同意的 eth 统计数据。 我编写了以下脚本:

    # only ENET5 enabled
    # ip addr add 192.168.1.71/24 brd + dev eth1
    ethtool -t eth1
    sleep 10
    ethtool -t eth1
    # ping from eth1 -> Aurix
    ping -I eth1 -w 10 192.168.1.50 &
    sleep 10
    ethtool -t eth1
    

    • 获取统计信息
    • 等待10秒钟
    • 再次获取统计信息
    • 从 eth1 -> Aurix 开始 ping、以 bg 为单位运行10秒
    • 等待10秒钟
    • 再次获取统计信息。

    我附上结果日志

    e2e.ti.com/.../eth_2D00_stats_2D00_ping_2D00_eth1_2D00_2_2D00_Aurix_5F00_20220812.txt

    以及格式化的结果:

    标签 T1:220s T2:230s T3:240 增量:T1、T2 Delta:T2、T3
    w.o ping 影响
    主机端口 rxGoodFrames 112 122. 134. 10. 12.
    rxBcastFrames 10. 11. 18 1 7.
    rxMcastFrames 102. 111. 116 9. 5.
    Droalep 16. 19. 21. 3. 2.
    rxOctets 12012年 12850 13782 838 932
    txGoodFrames 23969 25149 26322 1180 1173.
    txBcastFrames 244. 256 268. 12. 12.
    txMcastFrames 23725. 24893 26054. 1168. 1161.
    txOctets 1617647 1697359 1776472 79712. 79113
    四帧64 245. 258. 277. 13. 19.
    四帧65到127 23818 2499 26157. 1175. 1164.
    八个帧128至255 9. 11. 13. 2. 2.
    八个帧256至511 9. 9. 9. 0 0
    八位位组 1629659 1710209 1790254 80550 80045
    PortMaskDrop 16. 19. 21. 3. 2.
    alePolicyMatch 87 94 104. 7. 10.
    TXPr[0] 23969 25149 26322 1180 1173.
    txPriBcnt[0] 1604447 1683519 1761992年 79072 78473
    ENET5. rxGoodFrames 487892 511444. 534996 23552 23552
    rxBcastFrames 246. 258. 270 12. 12.
    rxMcastFrames 487646 511186 534726 23540. 23540.
    Droalep 463762 486140 508518 22378 22378
    rxOctets 48737575 51090285 53442987 2352710 2352702
    txGoodFrames 98 104. 114 6. 10.
    txBcastFrames 10. 12. 19. 2. 7.
    txMcastFrames 88 92 95 4. 3.
    txOctets 10768 11184. 11848 416. 6664
    四帧64 128513. 134719. 140930. 6206 6211.
    四帧65到127 328321 344170 360018 15849 15848
    八个帧128至255 15. 15. 15. 0 0
    八个帧256至511 20764 21766 22768 1002. 1002.
    octetsFrames512to1023 10377 10878 11379 501 501
    八位位组 48748343 51101469 53454835 2353126 2353366
    PortMaskDrop 463762 486140 508518 22378 22378
    aleUnknownMcast 10. 10. 10. 0 0
    aleUnknownMcastBcnt 1056. 1056. 1056. 0 0
    alePolicyMatch 24130 25304 26478 1174. 1174.
    TXPr[0] 24 26 33. 2. 7.
    txPr[1] 1 1 1 0 0
    TXPri [2] 73. 77 80 4. 3.
    txPriBcnt[0] 5448 5576 6024. 128 448
    txPriBcnt[1] 64 64 64 0 0
    txPriBcnt[2] 5256 5544. 5760. 288 216

    此表还显示了第一个10秒间隔(w.o. ping)和第二个10秒间隔(ping 处于活动状态)的差异。 我看不到任何令人震惊的东西,我希望你能看到。

    ===

    您是否能够检查 MAC2MAC 缺少配置(强制链接)? 您怀疑激活的配置可能是默认的10Mbps/半双工。

    Best Stefan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="491633" URL"~/support/processors-group/processors/f/processors-forum/1116392/tda4vm-9g-switch-not-active-in-sdkl-sdkr-8-2/4176095 #4176095"]您是否能够检查 MAC2MAC 的配置(强制链接)缺失? 您怀疑激活的配置可能是默认的10Mbps/半双工。

    我所想到的标志仅适用于 SGMII 连接。 对于没有 PHY 模式的 RGMII、自动协商被禁用。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    直接读取端口 ENET5 (和 ENET3)的端口设置怎么样? 我在 TRM 中查看了例如

    12.2.2.6.1.12 CPSW_SS_RGMII4_STATUS_REG 寄存器(偏移= 3Ch)[复位= X]

    但未找到所有端口的端口状态寄存器...

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    推断端口 ENET5及更高版本的地址并通过 devmem2读取存储器:

    部分 寄存器 地址 数据宽度 数据读取 重复性 速度 链接
    12.2.2.6.1.9 CPSW_SS_RGMII1_STATUS_REG 0x0c000030 W 0x00000003 一半 100米 向上
    12.2.2.6.1.10 CPSW_SS_RGMII2_STATUS_REG 0x0c000034 W 0x00000000 一半 10m DN
    12.2.2.6.1.11 CPSW_SS_RGMII3_STATUS_REG 0x0c000038 W 0x0000000D 完全 1G 向上
    12.2.2.6.1.12 CPSW_SS_RGMII4_STATUS_REG 0x0c00003c W 0x00000000 一半 10m DN
    CPSW_SS_RGMII5_STATUS_REG 0x0c000040 W 0x0000000D 完全 1G 向上
    CPSW_SS_RGMII6_STATUS_REG 0x0c000044 W 0x00000003 一半 100米 向上

    如下所示:

    • MAC2MAC 连接(3、5)为 1G /全双工
    • RGMII 转换(1、6)- 100M/半双工
    • RMII 连接(2、4)- 10M /半双工

    RGMII/RMII PHY 连接端口仍然被禁用、RMII 连接处的 PHY 甚至不活动

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    读取端口模式寄存器:

    部分 寄存器 地址 数据宽度 数据读取 RGMII 内部 延迟模式 端口模式
    5.1.3.4.48. CTRLMMR_ENET1_CTRL 0x00104044 W 0x00000012. RGMII
    5.1.3.4.49. CTRLMMR_ENET2_CTRL 0x00104048 W 0x00000001 不适用 RMII
    5.1.3.4.50 CTRLMMR_ENET3_CTRL 0x0010404c W 0x00000002 内部 TX 延迟 RGMII
    5.1.3.4.51. CTRLMMR_ENET4_CTRL 0x00104050 W 0x00000001 不适用 RMII
    5.1.3.4.52. CTRLMMR_ENET5_CTRL 0x00104054 W 0x00000012. RGMII
    5.1.3.4.53. CTRLMMR_ENET6_CTRL 0x00104058 W 0x00000012. RGMII
    5.1.3.4.54. CTRLMMR_ENET7_CTRL 0x0010405c W 0x00000002 内部 TX 延迟 RGMII
    5.1.3.4.55 CTRLMMR_ENET8_CTRL 0x00104060 W 0x00000002 内部 TX 延迟 RGMII

    我在 两个值下尝试了 CTRLMMR_ENET5_CTRL.RGMII_ID_MODE -似乎仍然没有通信 CPSW9G -> SJA1105

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我检查了 RGMII5 I/F 上的引脚多路复用器、对我来说似乎可以

    root@j7-evm:~# ./read-rgmii5-pinmux.sh
    /dev/mem opened.
    Memory mapped at address 0xffff8e580000.
    Read at address  0x0011C158 (0xffff8e58c158): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffff87b90000.
    Read at address  0x0011C15C (0xffff87b9c15c): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffb6ff0000.
    Read at address  0x0011C160 (0xffffb6ffc160): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffff8dcd0000.
    Read at address  0x0011C164 (0xffff8dcdc164): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffb79f0000.
    Read at address  0x0011C168 (0xffffb79fc168): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffff8ae60000.
    Read at address  0x0011C16C (0xffff8ae6c16c): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffb12d0000.
    Read at address  0x0011C170 (0xffffb12dc170): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffa5e10000.
    Read at address  0x0011C174 (0xffffa5e1c174): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffac090000.
    Read at address  0x0011C178 (0xffffac09c178): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffbcf00000.
    Read at address  0x0011C17C (0xffffbcf0c17c): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffffb68a0000.
    Read at address  0x0011C180 (0xffffb68ac180): 0x0000
    /dev/mem opened.
    Memory mapped at address 0xffff85940000.
    Read at address  0x0011C184 (0xffff8594c184): 0x0000
    root@j7-evm:~#

    信号 焊球 多路复用模式 类型 地址 寄存器 16位第
    RGMII5_TXCTL U23. 0 输出 0x00011C158 PADCONFIG86 0x0000
    RGMII5_RXCTL U26. 0 在中 0x00011C15c PADCONFIG87 0x0000
    RGMII5_TXD3 V28 0 输出 0x00011C160 PADCONFIG88 0x0000
    RGMII5_TXD2 V29 0 输出 0x00011C164 PADCONFIG89 0x0000
    RGMII5_TXD1 V27. 0 输出 0x00011C168 PADCONFIG90 0x0000
    RGMII5_TXD0 U28. 0 输出 0x00011C16c PADCONFIG91 0x0000
    RGMII5_TXCLK U29. 0 输出 0x00011C170 PADCONFIG92 0x0000
    RGMII5_RXCLK U25. 0 在中 0x00011C174 PADCONFIG93 0x0000
    RGMII5_RXD3 U27. 0 在中 0x00011C178 PADCONFIG94 0x0000
    RGMII5_RXD2 U24. 0 在中 0x00011C17c PADCONFIG95 0x0000
    RGMII5_RXD1 R23 0 在中 0x00011C180 PADCONFIG96 0x0000
    RGMII5_RXD0 T23. 0 在中 0x00011C184 PADCONFIG97 0x0000
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    =1=

    读取 pinmux @ QNX:除了无法读取16位值之外、pinmux 设置看起来正确

    例如

    J7EVM@QNX:/# k3conf read 0x0011c158
    |--------------------------------------------------------------------------------|
    | VERSION INFO |
    |--------------------------------------------------------------------------------|
    | K3CONF | QNX |
    | SoC | J721E SR2.0 |
    | SYSFW | ABI: 3.1 (firmware version 0x0014 '20.8.5--v2020.08b (Terrific Lla)') |
    |--------------------------------------------------------------------------------|
    
    Value at addr 0x11c158 = 0x00010000

    。 。 。
    Value at addr 0x11c158 = 0x00010000
    Value at addr 0x11c15c = 0x00050000
    Value at addr 0x11c160 = 0x00010000
    Value at addr 0x11c164 = 0x00010000
    Value at addr 0x11c168 = 0x00010000
    Value at addr 0x11c16c = 0x00010000
    Value at addr 0x11c170 = 0x00010000
    Value at addr 0x11c174 = 0x00050000
    Value at addr 0x11c178 = 0x00050000
    Value at addr 0x11c17c = 0x00050000
    Value at addr 0x11c180 = 0x00050000
    Value at addr 0x11c184 = 0x00050000

    =2=

    使用内部 TX 延迟重新测试 ENET5端口:使用内部 TX 延迟时、时钟边沿与数据中心对齐(RGMII 时钟偏移)。 在通信工作的 QNX 处、RGMII 与时钟偏斜不同时(请参阅下文)

    Linux -内部延迟:RGMII5_TXC、RGMII5_TD0

    =3=

    捕获 TXD0/TXCLK 信号:使用200MHz 范围、因此信号是一个位 BW 兼容、但相位关系是可识别的。 未观察到 Linux 和 QNX 之间的差异。

    Linux:RGMII5_TXC、RGMII5_TD0


    QNX:RGMII5_TXC、RGMII5_TD0

    =4=

    读取 NXP 接收状态寄存器(端口1是相关寄存器):

    在 Linux 上、不是单个有效 Rx、而是 SOF (帧起始)错误

    1 123425550 8-7:82:44|SwtMng: -- Port counters --
    1 123425593 8-7:83:92|SwtMng: MAC Lvl counters: Port 0 Port 1 Port 2 Port 3 Port 4
    1 123425648 8-7:84:96|SwtMng: Runt 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123425702 8-7:85:96|SwtMng: SOF Error 00000000 | 00000255 | 00000000 | 00000000 | 00000000
    1 123425755 8-7:86:96|SwtMng: Align error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123425809 8-7:87:96|SwtMng: Mii error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123465567 8-7:88:92|SwtMng: Frame counters: Port 0 Port 1 Port 2 Port 3 Port 4
    1 123465623 8-7:89:96|SwtMng: Transmit 00289035 | 00289035 | 00288961 | 00289035 | 00000088
    1 123505616 8-7:90:96|SwtMng: Receive 00000000 | 00000000 | 00000081 | 00000000 | 00294915
    1 123545570 8-7:91:92|SwtMng: Drop counters: Port 0 | Port 1 | Port 2 | Port 3 | Port 4
    1 123545626 8-7:92:96|SwtMng: BE-Policing 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123585577 8-7:93:96|SwtMng: Ct-Policing 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123625583 8-7:94:96|SwtMng: VL-NotFound 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123665575 8-7:95:96|SwtMng: CRC-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123705622 8-7:96:96|SwtMng: Size-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123745581 8-7:97:96|SwtMng: Unreleased 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123785576 8-7:98:96|SwtMng: VLAN-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123825577 8-7:99:96|SwtMng: Queue-Full 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123865581 8-7:100:96|SwtMng: Partition-Full 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123905614 8-7:101:96|SwtMng: Egr-disabled 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123945581 8-7:102:96|SwtMng: Not-reachable 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 123985580 8-7:103:96|SwtMng: MAC not learned 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124025576 8-7:104:96|SwtMng: Empty route 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124065581 8-7:105:96|SwtMng: Illegal DTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124105620 8-7:106:96|SwtMng: DTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124145580 8-7:107:96|SwtMng: SOTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124185581 8-7:108:96|SwtMng: SITAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 124225577 8-7:109:96|SwtMng: Untagged 00000000 | 00000000 | 00000000 | 00000000 | 00000000

    在 QNX 处不是单一错误、而是有效的 Rx 帧

    1 72225551 8-7:198:44|SwtMng: -- Port counters --
    1 72225595 8-7:199:92|SwtMng: MAC Lvl counters: Port 0 Port 1 Port 2 Port 3 Port 4
    1 72225650 8-7:200:96|SwtMng: Runt 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72225703 8-7:201:96|SwtMng: SOF Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72225757 8-7:202:96|SwtMng: Align error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72225810 8-7:203:96|SwtMng: Mii error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72265567 8-7:204:92|SwtMng: Frame counters: Port 0 Port 1 Port 2 Port 3 Port 4
    1 72265622 8-7:205:96|SwtMng: Transmit 00168680 | 00168704 | 00168602 | 00168680 | 00000121
    1 72305616 8-7:206:96|SwtMng: Receive 00000000 | 00000029 | 00000085 | 00000000 | 00172168
    1 72345568 8-7:207:92|SwtMng: Drop counters: Port 0 | Port 1 | Port 2 | Port 3 | Port 4
    1 72345624 8-7:208:96|SwtMng: BE-Policing 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72385579 8-7:209:96|SwtMng: Ct-Policing 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72425580 8-7:210:96|SwtMng: VL-NotFound 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72465583 8-7:211:96|SwtMng: CRC-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72505622 8-7:212:96|SwtMng: Size-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72545575 8-7:213:96|SwtMng: Unreleased 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72585580 8-7:214:96|SwtMng: VLAN-Error 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72625581 8-7:215:96|SwtMng: Queue-Full 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72665576 8-7:216:96|SwtMng: Partition-Full 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72705616 8-7:217:96|SwtMng: Egr-disabled 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72745577 8-7:218:96|SwtMng: Not-reachable 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72785580 8-7:219:96|SwtMng: MAC not learned 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72825579 8-7:220:96|SwtMng: Empty route 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72865579 8-7:221:96|SwtMng: Illegal DTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72905618 8-7:222:96|SwtMng: DTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72945577 8-7:223:96|SwtMng: SOTAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 72985576 8-7:224:96|SwtMng: SITAG 00000000 | 00000000 | 00000000 | 00000000 | 00000000
    1 73025574 8-7:225:96|SwtMng: Untagged 00000000 | 00000000 | 00000000 | 00000000 | 00000000

    =5=

    检查帧起始:捕获 RGMII5_TD0 / RGMII5_TD1 RGMII5_TD0上64个1的前导码和 RGMII5_TD1上64个0的前导码似乎是正确的

    Linux:RGMII5_TD0、RGMII5_TD1

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    =6=

    还验证了帧始终从 RGMII5_TXC 时钟边沿(时钟极性)上升开始。 这也是相同的@ Linux 和@ QNX。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    更新:

    =1=

    我已@ iperf 也能正常工作 Δ t tcp。

    =2=

    我有一个到电路板的稳定 ssh 连接。

    =3=

    如下图所示、为 CPSW9G 交换机设置静态配置、我设法在 eth1接收 Aurix 的 gPTP 数据包、但在 eth0接收

    static int32_t EthApp_addMpu10StaticCfg(Enet_Handle hEnet,
                                            uint32_t coreId,
                                            uint32_t flowId)
    {
        const uint8_t mcastAddrPtp[ENET_MAC_ADDR_LEN] = {0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e};
        const uint8_t mcastAddrMw[ENET_MAC_ADDR_LEN] = {0x01, 0x00, 0x5e, 0x00, 0x00, 0x00};
    
        appLogPrintf(">>>>>>>>>>>> %s(): add ENET3/ENET5 policers\n", __func__);
        CpswAle_SetPolicerEntryInArgs polInArgs;
        CpswAle_SetPolicerEntryOutArgs polOutArgs;
        CpswAle_SetMcastEntryInArgs mcastInArgs;
        Enet_IoctlPrms prms;
        uint32_t entry;
        int32_t status = ENET_SOK;
    
        polInArgs.policerMatch.policerMatchEnMask = 0U;
    
        /* Add policer entry for port 3 and dstmac */
        polInArgs.policerMatch.policerMatchEnMask = CPSW_ALE_POLICER_MATCH_PORT;
        polInArgs.policerMatch.portIsTrunk = false;
    
        polInArgs.policerMatch.policerMatchEnMask |= CPSW_ALE_POLICER_MATCH_MACDST;
        polInArgs.policerMatch.dstMacAddrInfo.portNum = CPSW_ALE_HOST_PORT_NUM;
        polInArgs.policerMatch.dstMacAddrInfo.addr.vlanId = 0U;
    
        polInArgs.threadIdEn = true;
        polInArgs.threadId   = flowId;
        polInArgs.peakRateInBitsPerSec   = 0U;
        polInArgs.commitRateInBitsPerSec = 0U;
        polInArgs.policerMatch.policerMatchEnMask = CPSW_ALE_POLICER_MATCH_PORT;
    
        appLogPrintf(">>>>>>>>>>>> %s(): add ENET3/ENET5 PTP policers\n", __func__);
    
        /* Add policer entry for port 3 and PTP dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddrPtp[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_3);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to register PORT3 | PTP MACDST policer: %d\n", status);
            }
        }
    
        /* Add policer entry for port 5 and PTP dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddrPtp[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_5);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to register PORT5 | PTP MACDST policer: %d\n", status);
            }
        }
    
        uint8_t mcastAddr[ENET_MAC_ADDR_LEN] = {0x01, 0x00, 0x5E, 0x00, 0x00, 0x01};
    
        /* Add policer entry for port 3 and dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddr[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_3);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK)
            {
                appLogPrintf("Failed to register PORT3 | PTP MACDST policer: %d\n", status);
            }
        }
    
        /* Add policer entry for port 5 and dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddr[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_5);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK)
            {
                appLogPrintf("Failed to register PORT5 | PTP MACDST policer: %d\n", status);
            }
        }
    
        /* Add multicast entry with port mask: host port, MAC port 3 and MAC port 5 */
        if (status == ENET_SOK)
        {
            mcastInArgs.addr.vlanId = 0U;
    
            mcastInArgs.info.super    = false;
            mcastInArgs.info.fwdState = CPSW_ALE_FWDSTLVL_FWD;
            mcastInArgs.info.portMask = (CPSW_ALE_HOST_PORT_MASK |
                                         CPSW_ALE_MACPORT_TO_PORTMASK(ENET_MAC_PORT_3) |
                                         CPSW_ALE_MACPORT_TO_PORTMASK(ENET_MAC_PORT_5));
    
            EnetUtils_copyMacAddr(&mcastInArgs.addr.addr[0], &mcastAddrPtp[0]);
            mcastInArgs.info.numIgnBits = 0U;
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &mcastInArgs, &entry);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_ADD_MCAST, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to add PTP mcast ports: %d\n", status);
    	}
    
           if (status == ENET_SOK)
           {
               EnetUtils_copyMacAddr(&mcastInArgs.addr.addr[0], &mcastAddrMw[0]);
               mcastInArgs.info.numIgnBits = 10U;
    
               ENET_IOCTL_SET_INOUT_ARGS(&prms, &mcastInArgs, &entry);
    
               status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_ADD_MCAST, &prms);
               if (status != ENET_SOK) {
                   appLogPrintf("Failed to add MW mcast ports range, status: %d\n", status);
               }
           } 
        }
    
        return status;
    }
    

    =4=

    由于 ETH1不具备任何 TX 时间戳功能( 硬件和软件时间戳)、因此我们必须使用 eth0。 需要如何配置 CPSW9G 以支持 ENET 端口之间的 PTP 协议?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Stefan、

    您是否打算将来自端口5的所有 PTP 数据包转发到端口3?

    在我看来、您已将来自端口3或端口5的 PTP 数据包转发到 A72、并遵循以下规则。

        /* Add policer entry for port 3 and dstmac */
        polInArgs.policerMatch.policerMatchEnMask = CPSW_ALE_POLICER_MATCH_PORT;
        polInArgs.policerMatch.portIsTrunk = false;
    
        polInArgs.policerMatch.policerMatchEnMask |= CPSW_ALE_POLICER_MATCH_MACDST;
        polInArgs.policerMatch.dstMacAddrInfo.portNum = CPSW_ALE_HOST_PORT_NUM;
        polInArgs.policerMatch.dstMacAddrInfo.addr.vlanId = 0U;
    
        polInArgs.threadIdEn = true;
        polInArgs.threadId   = flowId;
        polInArgs.peakRateInBitsPerSec   = 0U;
        polInArgs.commitRateInBitsPerSec = 0U;
        polInArgs.policerMatch.policerMatchEnMask = CPSW_ALE_POLICER_MATCH_PORT;
    
        appLogPrintf(">>>>>>>>>>>> %s(): add ENET3/ENET5 PTP policers\n", __func__);
    
        /* Add policer entry for port 3 and PTP dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddrPtp[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_3);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to register PORT3 | PTP MACDST policer: %d\n", status);
            }
        }
    
        /* Add policer entry for port 5 and PTP dstmac */
        if (status == ENET_SOK)
        {
            EnetUtils_copyMacAddr(&polInArgs.policerMatch.dstMacAddrInfo.addr.addr[0], &mcastAddrPtp[0]);
            polInArgs.policerMatch.portNum = CPSW_ALE_MACPORT_TO_ALEPORT(ENET_MAC_PORT_5);
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &polInArgs, &polOutArgs);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_SET_POLICER, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to register PORT5 | PTP MACDST policer: %d\n", status);
            }
        }
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的。 我看到以下规则应启用多播 PTP 封装以进入端口3。  

        /* Add multicast entry with port mask: host port, MAC port 3 and MAC port 5 */
        if (status == ENET_SOK)
        {
            mcastInArgs.addr.vlanId = 0U;
    
            mcastInArgs.info.super    = false;
            mcastInArgs.info.fwdState = CPSW_ALE_FWDSTLVL_FWD;
            mcastInArgs.info.portMask = (CPSW_ALE_HOST_PORT_MASK |
                                         CPSW_ALE_MACPORT_TO_PORTMASK(ENET_MAC_PORT_3) |
                                         CPSW_ALE_MACPORT_TO_PORTMASK(ENET_MAC_PORT_5));
    
            EnetUtils_copyMacAddr(&mcastInArgs.addr.addr[0], &mcastAddrPtp[0]);
            mcastInArgs.info.numIgnBits = 0U;
    
            ENET_IOCTL_SET_INOUT_ARGS(&prms, &mcastInArgs, &entry);
    
            status = Enet_ioctl(hEnet, gEthAppObj.coreId, CPSW_ALE_IOCTL_ADD_MCAST, &prms);
            if (status != ENET_SOK) {
                appLogPrintf("Failed to add PTP mcast ports: %d\n", status);
    	}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您能否转储 ALE 表以确认您已编程的所有规则?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Stanley、

    请参阅下面我的回复

    =1=

    因此、我仍然使用上面指定的设置连接"ethtool -t eth1"命令的输出。 结果分为与寄存器设置(ethtool-ale.txt)以及统计数据(ethtool-stats.txt)相关的结果。

    e2e.ti.com/.../ethtool_2D00_stats.txte2e.ti.com/.../ethtool_2D00_ALE.txt

    =2=

    目的是

    1. 获取端口3和5 (双向)之间传输的所有 PTP 数据包
    2. 获取01:00:5e:00:00:00:00掩码 ff:ff:ff:ff:ff:fc:00范围内的所有 MC 数据包、在端口3和5之间进行中继(双向)

    只要我们在 A72/eth0接收到任何数据、我们就不需要在 A72/eth1接收任何数据。 目前、在 eth1接收 PTP 数据包非常方便-从接收到这些数据包的意义上来说

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    添加 eth0的 ale dump ("ethtool -d eth0")

    e2e.ti.com/.../ethtool_2D00_d.txt

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    仍然使用上述配置、我查看端口统计信息、目的是确定主机端口和 MAC 端口3与 CPSW2G 之间的帧出口差异

       主机端口  MAC 端口3  MAC 端口5 HP - P3
     rxGoodFrames              61. 124. 234150 -63.
     rxBcastFrames             8. 7. 72. 1
     rxMcastFrames             53. 29. 233811. 24
     rxAlignCodeErrors             1520 0
     Droalep                   12. 13. 1774. -1
     rxOctets                  6798 23664 23412939 -16866
     txGoodFrames              227681. 228354 160 -673
     txBcastFrames             78 79 15. -1
     txMcastFrames             227603 228011. 57. -408.
     txOctets                  22752952 22867357 28156. -114405
     四帧64            59150 59681 61583 -531
     四帧65到127       154040. 153771. 158850 269.
     八个帧128至255      11. 356. 361. -345人
     八个帧256至511      9699 9785 10029. -86
     octetsFrames512to1023     4842. 4885. 5007. -43.
     八位位组                 22759750 22891021 23593221 -131271
     PortMaskDrop              12. 13. 3294 -1
     aleUnknownUcast             10.   -10
     aleUnknownUcastBcnt         2070   -2070
     aleUnknownMcast             3. 6. -3.
     aleUnknownMcastBcnt         364. 709. -364.
     aleUnknownBcast             2.   -2.
     aleUnknownBcastBcnt         668   -668
     alePolicyMatch            42. 5. 11544. 37.
     TXPr[0]                  227681. 228353 124. -672.
     txPr[1]                    1 1 -1
     TXPri [2]                      35. 0
     txPriBcnt[0]              22746704 22867293 25572 -120589
     txPriBcnt[1]                64 64 -64
     txPriBcnt[2]                  2520. 0

    txGoodFrames txMcastFrames 之间的差异足够小、因此这将指向端口3处传输到 CPSW2G 的 PTP 帧。

    我的解释是否正确? 如何在 CPSW2G 上丢弃 PTP? 请 发表您的意见。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    排除 app_ethfw_freertos.c 中某些 PTP 相关代码后、PTP 帧可在 eth0处接收。 我还不知道哪些除外条款是足够的、至少这一点是必要的:

    • 排除对 EthFw_initTimeSyncPtp()的调用

    也不包括:

    • gEthApp_sharedMcastAddrTable[]中的共享 MC 地址
    • gEthApp_rsvdMcastAddrTable[]中保留的 MC 地址

    使用以下 PTP 帧、可以在 eth1和 eth0上观察到:

    • 从 Aurix 发送的同步和同步跟踪消息
    • 由绑定到 I/F eth0的 ptp4l 发送的 peer_delay_Req 消息

    无法观察到应从 Aurix 作为对 Peer_Delay_Req 的答复发送的相应 Peer_Delay_Resp。 目前尚不清楚 Aurix 是否未收到请求或 是否未能回复请求。

    问:  CpswAle_SetPolicerEntryInArgs.threadIdEn /  CpswAle_SetPolicerEntryInArgs.threadId 的详细信息是什么? 请 指向"文档"。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    阐明:Aurix 接收 Aurix 未发送的 Peer_Delay_Req、Peer_Delay_Resp。