I tied to print the packet length calculation in my program before sending it out.
I think the UDP payload length and IP length length calculation looks fine.
APP: INFO: ip header checksum:f9b9 udp checksum size_udp:736 sizeof(struct udp_hdr):8,size_ApplMsg:728udphdr->dgram_len:57346 m->data_len:770 size_ip:756 l2_data_shift:14
Further I am able to transfer UDP packets of size 20bytes,40 bytes using the same program.No issues observed.So right now I do not suspect the program. But I donot understand why the wireshark says "Bad UDP payload length". Not sure how the packet length can go wrong.Whether UDP packet is hardware offloaded ? We may be dropping the packet at the Kernel level due to this bad UDP length. So I tried to increase the UDP buffer size in kernel but of no use.
The netstat -su output shows 0 send/receive buffer errors.
[root@ATCAC06_100 /]# netstat -su
592800 packets received
1439 packets to unknown port received.
0 packet receive errors
501661 packets sent
0 receive buffer errors
0 send buffer errors
In my program I am trying to read the return value of "recvFrom" call is -1 and in that case I tried to print the strerror(errno).
But I could get prints only for the successful case ( return value > 0) and not for unsuccessful case.So mostly the packet is getting dropped at the Kernel level but how do I confirm this.Any debugging steps please share. I am using DPDK 18.08 version( on RHEL 7.6 platform) for packet forwarding.Please suggest how to resolve this issue.
modified 19-Apr-19 14:47pm.