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.

DM8168 network issue

      I am making a DM8168 network test. I found when my application  send UDP packets quickly ,the former 62B of the adjacent two UDP packets would be identical. 

                                                                                    testing on Ti EVM board (21bytes of data to be sent)

(My  application send 21 bytes by UDP protocol, so the size of the packet was 63B.  The transmission data contains an incremented count value, and  the rest of the 21B was filled with the same data.)

See the screenshot:

---The serial number of  the  first packet was 682 and the populated data was 0xaa.

---The serial number of  the  second packet must be 683 (but it became 682) and the populated data must be 0xab(but only the last byte was 0xab). 

I have dump the skb data transmitted data in the EMAC driver, all the bytes were correct.  But when I used wireshark to capture the packet , I found the former 62B of the adjacent two UDP packets were identical.

If I invoked  the "flush_dcache_page (virt_to_page (data))" in the start_xmit function  the error probability would  significantly reduce.  Whether it is a result of cache coherence problem?

thanks

DM8168.zip
  • Hi

    Can you share the steps/application that can be used to recreate the problem.

    If you could also dump the base address of the buffer(skb->data), we could then check if this happens to line up with cache line size

    Also, what version of the driver/SW are you using

    Regards

    Sriram

  • Hi Sriram,

         Thanks for you reply. I am using DVRRDK_03.00.00.00.  I have uploaded my application. 

    DM8168.zip
  •                                                                 testing on our own board (4bytes of data to be sent)

    According to the screenshot we could see the serial number of the adjacent two UDP packets were the same.

    But when I dumped the skb data in the emac driver, I found this two packets were different.(different was correct)

    modification:

    static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev)

    {

        struct device *emac_dev = &ndev->dev;

        int ret_code;

        struct emac_priv *priv = netdev_priv(ndev);

     

        /* If no link, return */

        if (unlikely(!priv->link)) {

            if (netif_msg_tx_err(priv) && net_ratelimit())

                dev_err(emac_dev, "DaVinci EMAC: No link to transmit");

            goto fail_tx;

        }

     

    FRAME_DUMP("TX:", skb->data, skb->len);

    log:

    TX:: len=46, bufp=0x8d807b02

    00 0c 29 8a 91 6f 00 15 65 56 76 43 08 00 45 00 00 20 00 00 40 00 40 11 ... 00 0c 38 a1 33 38 31 37

    RX:: len=60, bufp=0x8cd65064

    22 b8 27 0f 00 0c 38 a1 33 38 31 37 00 00 00 00 00 00 00 00 00 00 00 00 ... 41 41 41 00 20 46 4a 45

    TX:: len=46, bufp=0x8d807b02

    00 0c 29 8a 91 6f 00 15 65 56 76 43 08 00 45 00 00 20 00 00 40 00 40 11 ... 00 0c 38 a0 33 38 31 38

    We could see this two packets  were different.

  •  Any others experiencing this problem?

  • Hi

    Your previous post seems to show different results

    1.The destination MAC address field seems to be different between the frames that you are comparing

    2. Only 4 bytes of data seem to be sent (as against 21 earlier)

    Can you confirm if you had changed your application -and why the Destination address is different now

     

    If you are working with ethernet ports(both being connected to the same subnet), can you re-run the test with just one port being connected to the network

    Regards

    Sriram

  • Hi Sriram,

       Sorry, I have not described clearly.  My previous post is the test results on the Ti EVM board and there are 21bytes of data to be sent. My second post is the test results on our own board. I just sent 4bytes of data. So this two boards have different Destination address. Both of this two board are all have this issue.

  • Hi

    I was actually referring to the last posting , where you were comparing between 2 frames(both with 4bytes data, with wireshark frame numbers 13258 and 13262 respectively) but the destination MAC address between the 2 frames were not the same - have you explored why this could be?

    Regards

    Sriram

  • Hi

           The destination MAC address(80:8d:xx:xx:xx) is belong to our gateway. That packet was sent to the gateway. It looks  strange.So I have made a new test.(100bytes of data to be sent)

  •  Any others experiencing this problem?

  •  Any others experiencing this problem?

  • Hi!

    I experienced the same issue and it's now corrected.

    I had to modify linux kernel drivers : davinci_emac (emac_dev_xmit) and davinci_cpdma (all the file).

    Please find attached these files corrected.


    Regards6560.net.zip