Hi,
I got a new P4080DS board, and tried a sample UDP sender program on the board to send packets, but I see there is a packet loss. I am no table to find it in DPA counters, or when I check under command "ethtool fm1-gb1", the tx errors it show as 0.
I am sure they are lost inside the board itself, as even when I connect the board directly to another system, I see packet loss. I even tried changing the cable but no use.
If I try to send some 17 or 18 packets at once, there is always a loss. I wanted to send more packets from my telecom application otherwise it is of no use.
Could any one please suggest on how to find the cause/ and resolve this issue?
Thanks,
Sharath Chandra
Hi,
Did you check the BMI counters?
Hi,
Yes, I checked both in BMI counters and DPA counters. The Tx packets which are lost somewhere in the system are not shown either in BMAN, FMAN or QMAN.
And one more thing, could you please suggest on how do I check the MAC counters on the board?
Counters info:
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_dealloc_buf
fm0-port-tx1 counter: 0
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_deq_from_default
fm0-port-tx1 counter: 0
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_discard_frame
fm0-port-tx1 counter: 0
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_frame
fm0-port-tx1 counter: 462128
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_unsupprted_format
fm0-port-tx1 counter: 0
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_deq_confirm
fm0-port-tx1 counter: 467478
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_deq_total
fm0-port-tx1 counter: 468954
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_enq_total
fm0-port-tx1 counter: 470972
root@p4080ds:/sys# cat devices/ffe000000.soc/ffe400000.fman/ffe4a9000.port/statistics/port_length_err
fm0-port-tx1 counter: 0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_errors
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_heartbeat_errors
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_packets
201591
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_window_errors
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_aborted_errors
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_dropped
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_carrier_errors
0
root@p4080ds:/sys# cat class/net/fm1-gb1/statistics/tx_compressed
0
root@p4080ds:/sys#
(For your information, there are Rx errors displayed in BMI counters and also under ethtool as rx errors, which is not an issue for my application, my one and only concern was about Tx frames, which are lost and not displayed anywhere).
Thanks,
Sharath Chandra
Hi Sharath,
When you say you are sending 16-17 UDP packets in one go, it is nothing for Kernel and definitely not for Hardware. I have tried with the same P4080 about tens of thousands of packets and I never saw any single drop. They can be overflowed in Kernel UDP stack which you can check with netstat or other statistics commands. The MAC statistics were correct:
cat class/net/fm1-gb1/statistics/tx_packets... it will show you tx'd packets
Could you please explain your system setup? Which DTB files are you using? are you running any DPAA application?
You can first transmit 100 packets and check in netstat if they are queued in UDP stack, later check it in MAC counters and then BMI.
Adeel
Hi Sharath Chandra,
Can you please share your code?
Have a great day,
Lunmin
Hi Lunmin,
I want to send a lot of packets at once, as it was not working for my application, I tried to test with a sample udp program, which just sends packet to other destination.
Please find the code below:
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
int sockfd = 0, n = 0;
struct sockaddr_in servaddr,cliaddr;
char sendline[1400];
memset(&sendline,'\0',sizeof(sendline));
memset(&servaddr,'\0',sizeof(servaddr));
for(n = 0;n < 1400; n++)
sendline[n] = 'a';
sockfd=socket(AF_INET,SOCK_DGRAM,0);
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr=inet_addr("10.10.10.155");
servaddr.sin_port=htons(32000);
n=0;
do
{
sendto(sockfd,sendline,strlen(sendline),0, \
(struct sockaddr *)&servaddr,sizeof(servaddr));
n++;
}while (n < 800);
return 0;
}
I experienced packet loss in the above code too. The packet loss is variable, but it is there most of the times.
I checked DPA counters and BMI counters for packet loss but did not find anything, and how do I check the MAC counters?
Probably thinking they are lost at the MAC.
Do I have to set any PCD policy in the board using FMC tool?
Thanks,
Sharath Chandra
Hello Sharath Chandra,
What's your host IP address, and whether is the target host (10.10.10.155) is alive or not? In other words, if your run the command "ping 10.10.10.155", does it works or not? How do you conclude the packet loss? In your code, you do not assert the return value of sendto.
Regards
Lunmin