Helpful ReplyHot!UDP Message Data Exchange Rate

Author
jolati
Starting Member
  • Total Posts : 15
  • Reward points : 0
  • Status: offline
2018/02/14 15:05:44 (permalink)
0

UDP Message Data Exchange Rate

On a PIC32 Ethernet Starter Kit II development board, I’ve adapted the Harmony v2_04 project “tcpip_udp_client_server” to have a unique static IP address, transmit UDP messages over one port, and receive UDP messages over another port.
 
A PC running a host program, configured with a unique static IP, receives from and transmits to the Starter Kit over a private network.
 
Both the Pic and the host are expected to “push” messages at a fixed rate (project requirement, as is using UDP). Everything is fine up to around 10 Hz. But faster than that, according to Wireshark, messages start being dropped. I would like to get that rate up to 30 Hz, which I’ve done with a similar set-up but using USB.
 
I’ve removed everything that wasn’t UDP related but left all the system_config.h values as they were except for TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS and TCPIP_NETWORK_DEFAULT_IP_ADDRESS & MASK
Not a lot of experience with Harmony or Ethernet at this level. Would welcome any suggestions on how I may improve the throughput?
#1
rainad
Super Member
  • Total Posts : 966
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: offline
Re: UDP Message Data Exchange Rate 2018/02/15 08:51:38 (permalink) ☄ Helpfulby jolati 2018/02/15 12:13:27
0
If the receiving part cannot keep up with the traffic, it may be that the time spent doing other processing outside the TCP/IP stack, including the processing of the incoming UDP data is too long. I.e. the incoming packets are not processed and discarded fast enough.
You should see this reported by the MAC driver in the statistics, RX overflow. Use the "macinfo" command from the console.
On the transmit side, there shouldn't be any  issues, unless you run out of  memory for the packets.
One test you could do is to run iperf between that board and your PC and see what rates you can achieve. Normally you could go up in excess of 80 Mbps.
 
 
#2
jolati
Starting Member
  • Total Posts : 15
  • Reward points : 0
  • Status: offline
Re: UDP Message Data Exchange Rate 2018/02/15 12:13:55 (permalink)
0
Thanks, I will check for RX overflow and run iperf. Appreciate the pointers.
#3
Jump to:
© 2018 APG vNext Commercial Version 4.5