Maximum Datagram size sent from Radio

  • 1
  • Question
  • Updated 2 years ago
In the code, the datagram buffer is set to 65536. According to Elliotte Harold, in one of his books on Network Programming, "most native UDP implementations don't support more than 8K of data per datagram". As I don't know what the native Linux (Android/Raspberry Pi) limits are I wanted to ask what was the real maximum packet size produced.
I have discovery converted and tested with VitaDiscoveryPacket and the other Vita classes converted.  I am less than a week away from having a working portable Flexlib. Working doesn't necessarily mean correctly. Is it possible that FRS will open source the NUnit tests for Flexlib? It would be ideal if there were a way to ask the radio to 'give me one of these packets' where a unit test could tell definitively if it was decoded properly. There are a lot of permutations in any given packet's contents. It would be nice to be able to say something stronger than "it seems to work OK ...knock wood".  I understand I am in a unique position with this request as most all others are running against the stock Flexlib which has already gone through QA.

Thanks,

Walt - kz1f
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 642 Reply Likes

Posted 3 years ago

  • 1
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 642 Reply Likes
Now that it's languished 3 months, I guess I'll answer this. The maximum UDP packet size was found to be greater than 4096 so I set 8192 as the max.
Photo of Brian M. N9ADG

Brian M. N9ADG

  • 1 Post
  • 0 Reply Likes
I'm just looking at the discovery packet description; per http://www.ice-online.com/support/documentation/ice-vita-49-0-radio-transport-ethernet-packet-specif...  it seems like 1440 is the max size of the payload?
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 642 Reply Likes
Trust me. I was correct the first time.
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 661 Posts
  • 203 Reply Likes
Somehow missed this one until now.  Walt said: "In the code, the datagram buffer is set to 65536."  Which code?

We definitely use some larger UDP packets for streaming.  The waterfall data is probably the largest as I recall.  I would have to take some measurements to be sure, but I suspect they are indeed in the 8k range.
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 642 Reply Likes
It was a manifest constant (Max_Vita_Packet_Size or something to that effect) and 65536 is actually not do-able. I believe I verified 8192 as the proper value back a year ago. The orignal question was upon seeing what was the manifest constant was and, according to Elliote Harold, was actually not a valid data size for UDP...It might be it was on Windows or perhaps an unused constant. XPSLib handles all the data streams just fine now, I inched it up from the 2k default to 8K. I finished it and the testing over a year ago at this point and haven't had a failure yet.

But thanks for getting back to me Eric :-) Seriously, I know you have been busy. Any time you are free to talk about some other issues, by all means, let me know.
(Edited)
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 661 Posts
  • 203 Reply Likes
I'm sure you are aware Walt, but for everyone else's benefit: the UDP protocol is interesting in that you can send relatively large datagrams and the protocol will actually break it into digestible (read reasonably-sized) packets and reassemble them at the far end.  As such, the limit on the size as defined in the IPv4 space is just under 64K (http://lmgtfy.com/?q=max+udp+packet+size).

Feel free to post questions here anytime (or a link to one if I've missed it!) -- however, I may require a demo of XPSSDR before I answer.  ;)
Photo of Walt - KZ1F

Walt - KZ1F

  • 3040 Posts
  • 642 Reply Likes
I'd be more than happy to accommodate that
Photo of Lee Maisel

Lee Maisel

  • 96 Posts
  • 13 Reply Likes
Will we be able to buy it for OSX/Linux soon?