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.

CCS/TMS320C6670: PA emac example transmite MAC packet to PC,some packet lost.

Part Number: TMS320C6670

Tool/software: Code Composer Studio

I use PA  emac example to transmite MAC packet to PC, I did a long time test.

for example,DSP 6670 transmite 100000 MAC packet,but PC just receive 99998 packet.

I checkd DSP register 0x02090C34 ,this register is "STATSB TXGOODFRAMES " register,this register record total number of good frames transmitted. It shows 100000.

can someone tell me why some MAC packet lost?

  • Hi,

    How do you record the packet received by PC? Using software like Wireshark? And how fast you transmit the packets? What is the software used for this test?

    Regards, Eric
  • Hi,

    I use a software named Omnipeek. The speed is not fast and is 100Mbps. Omnipeek is  a software like Wireshark.

     

    Regards,

    Tian

  • Well, we'd better know packet submission rate, are they sent back to back, or there is some spacing between them. In a similar situation we numbered the packets in their payload and checked the sequence at receiver side. At 100 Mbps definitely should be no loss.
  • Hi,

    I have similar problems sending big burst of UDP packets with non space. At least in my case, I found the problems was on PC side. I reduce the lost packets by:
    1. using a better switch
    2. use a better PC
    3. Increase the RX buffer of receiving socket (default Windows buffer is 8K)
  • Hi,Alberto Chessa
    Thank you for reply.
    I also found out the performance of the computer will affect the results, but I am not sure that is a bad computer performance led to packet loss. I do not know how to solve this problem either.
    In addition, I would like to ask, TCP / IP protocol can solve this problem.

    Regards,

    Tian

  • Hello!
    I would support Alberto's opinion with our observations. We found PC runs out of receive buffers if packets submitted fast enough. We solved that increasing receive buffer of the socket. Look for something like setsockopt(sock, SOL_SOCKET, SO_RCVBUF, ... Tweaking that we would able to get something like 300 Mbps not using jumbos.
    As to TCP/IP, it requires a lot of consideration. At least use of TCP requires use of NDK and more of its components. In our case we developed extremely lightweight eth-ip-udp implementaion of our own. Next, UDP is naturally packet protocol with distinct boundaries between datagrams. TCP is streaming protocol, and that changes a lot if you about to exchange messages.
  • Hi,rrlagic!

    I try to use wireshark to capture packet from 6678,it  looks good and no packet lost.In 6678, I set "for "cycle to send MAC packet to compture.

    its speed is 723 mbps. In case that total Byte is not more than buffer of wireshark, all packet received.

    I have another board use TMS320C6670. In this board, I use SGMII and SRIO interface.  I  send  MAC packet  in a way:

    every time  SRIO received a SWRITE packet and a DOORBELL packet,6678 send a MAC packet to compture.

       	while(1)
       	{
    		//multitasksem  is a Semaphore,it post from SRIO doorbell ISR
    	        Semaphore_pend(multitasksem, BIOS_WAIT_FOREVER);
    		{
    	                if (ICT_BBU_BSP_SGMII_SendPacket (0, pktMatch_Test+6,1024+2,dst_MACAddr) != 0)
    	               {
    	                         System_printf ("Packet %d send failed \n");
    	                           BIOS_exit (-1);
    	               }
    	                packet_send_cnt++;
    	        
    		}
       	}
    static void myDorrbellFunc
    (
        UArg argument
    )
    {
        CSL_SRIO_ClearDoorbellPendingInterrupt (hSrioCSL, DNUM, 0xFFFF);
        CSL_SRIO_ClearLSUPendingInterrupt (hSrioCSL, 0xFFFFFFFF, 0xFFFFFFFF);
        doorbell_rev_core++;
    
        Semaphore_post(multitasksem);   //post Semaphore to mac packet send function
    	
    
        return;
    }

    In this way,even MAC packet speed is 10Mbps, some packet will be lost.

    I dont know how to solve the question.can you help me?

    regards,

    Tian 

  • Hello,
    As you just stated, there is no problem with network subsystem performance, if tested alone. However, it would be unfair for me to guess possible reason without knowing anything about that application. Sorry.