我们将在春节假期期间对网站进行维护,可能暂时无法访问,同时工程师回复将有所延迟,敬请谅解.

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.

TMS320C6678: NDK ARP

Part Number: TMS320C6678

1、可以接收到ipv4协议下的UDP、TCP、DNS等类型的包,但是接收不到ARP包。将ehertype改为ARP协议:ethInfo.ethertype = 0x0806;  依然接收不到上位机传来的ARP包。请问是PA网络协议栈不支持接收ARP类型的包吗?

2、如果PA协议栈不支持接收ARP包,C6678可以通过什么方式接收到ARP包呢? 如果C6678接收不了一些类型的包,可否用C6657实现各种类型网络数据包的接收?我想用DSP实现一个类似桥接的功能,实现网络包的透传,例如将网口1收到的数据原封不动传递到网口2

  • 您好,我参考了您推荐的帖子 How to receive ARP requests with NetCp . 这篇帖子看起来只是把ethertype赋值为0x0806即可,但我这么做了,仍未收到ARP包。之前ethertype为0x0800时,我可以收到发往指定端口的UDP、TCP等ipv4包,但是我只更改了ethertype为0x0806,却收不到ARP包。我使用的是C6678-EVM

    我的配置如下:

    /* Initialize structure variable value */
    memset(&ethInfo, 0x0, sizeof(ethInfo));

    /* Ethernet type = IPv4 */
    ethInfo.ethertype = 0x0806;

    /* Input EMAC port = dont care */
    ethInfo.inport = pa_EMAC_PORT_NOT_SPECIFIED;

    if(Add_MACAddress (ethInfo) != 0) {
    printf("PASS add MACAddress failed\n");
    return -1;
    }

    /* Initialize structure variable value */
    memset(&ipInfo, 0x0, sizeof(ipInfo));

    /* Ethernet type = IPv4 */
    ipInfo.ipType = pa_IPV4;
    /* TOS = dont care */
    ipInfo.tosCare = FALSE;

    /* Add the IP address the example uses */
    if(Add_IPAddress(ipInfo) != 0) {
    printf("PASS add IPAddress failed\n");
    return -1;
    }

    /* Add the port number on which our application is going to listen on */
    if(Add_Port(DST_PORT) != 0) {
    printf("PASS add Port failed\n");
    return -1;
    }

    ...

    使用以上配置,当ethInfo.ethertype为0x0800时,可以正常收到发往DST_PORT端口的UDP包,但改为0x0806时却收不到发往DST_PORT端口的ARP包。

  • 请看下面e2e工程师的回复。

    After going through, the PDK drivers I have found out the "ARP" is not supported in PA drivers (It has been mentioned as an unsupported protocol in the source, but no documents to validate the fact).

    In one of the PDK's projects "PA_UnitTest_evmc6678_C66BiosTestProject", which runs several unit tests on PA, has a test case for ARP packet parsing. Let me do the checks on my EVM and provide the update.

    I request you to have a look on 

    "C:\ti\pdk_c667x_2_0_16\packages\ti\drv\pa\test\PAUnitTest\src\tests\test2.c" and "C:\ti\pdk_c667x_2_0_16\packages\ti\drv\pa\test\PAUnitTest\src\tests\test2pkts.h".

  • 谢谢,我测试一下PDK里的用例。后续考虑用无NETCP结构的C6657试一下是否支持ARP协议

  • 好的,如果还是不行的话,可以回复这个帖子。

  • 请看我们e2e工程师最新的回复。

     I have tested the ARP in my EVM, Following observations are made.

    • ARP table before and after running the NIMU project has been examined,


    Before

    After

      • FYI, In the above observation, the Host IP is "192.168.0.103" and EVM IP is "192.168.0.106".

      • Though, the ARP table runs on HOST RAM. It did receive IP configuration information from either router or my Host PC, Thus only after successful configuration IP and MAC address are matched.

    • In "PA_UnitTest_evm6678_C66BiosTestProject", on test2.c. ARP packet with eth type "0x0806" was sent.

      • The packet was maintained in array "t2EthAndSwinfo" at index 10 and sent with the below code.

    for (i = 0; i < 5; i++) {
    cmdReply.replyId = T2_CMD_SWINFO0_ADD_ID + i + 7;
    matchRoute.swInfo0 = nfailRoute.swInfo0 = t2EthAndSwinfo[i+7].swinfo0;
    hd[i] = testCommonAddMac (tf, t2EthIndex[i+7], (paEthInfo_t *)&t2EthAndSwinfo[i+7].eth, &matchRoute, &nfailRoute,
    &l2Handles[i+7].paHandle, tf->QGen[Q_CMD_RECYCLE], tf->QLinkedBuf2,
    &cmdReply, &cmdDest, &cmdSize, &paret);
    paL2HandleError (tf, pat, l2Handles, paret, hd[i]); /* Will not return on error */
    }

    • I can confirm that Test case "test2" is passed, which confirms the ARP package is sent.