Closed reactive-firewall closed 1 week ago
( 47 2 ) (7 2) = (94 14) = 1316
1500 is a common max size for underlying IP packets in general, because of the prevalence of Ethernet, who's frames are that size, but some space MUST be used for the header: ( 8 bytes for UDP + 20 bytes for IP ) = 28 bytes = 224 bits for headers This leaves us with a max closer to 1276 bits which just seemed odd and minimal when compared to an IPv6 smallest MTU of 1280 ... so the same equation 8 UDP + max 40 ipv6-header is even smaller: 🤓 looking to ipv6 with a 40 byte header we get 1500-48 ( 384 ) = 1116 bytes
(btw TCP headers can be as much as 20-60 bytes but then we would use 956 bytes chunks instead for similar logic worsening the issue)
🙉 Turns out this issue is not unique to this UDP multicast library project, and is debated without standardization much beyond the theory...
🤷🏻 So in the end it was just made up and is tested in CI.
1280
and smaller than 1500
which 1316 satisfies. So yeah, 1316.
Describe the question why is the chunk size
1316
in the code here:https://github.com/reactive-firewall/multicast/blob/37437e22325fbca99653518b708fe800342c9dc2/multicast/recv.py#L311
Expected answer form This is a common value from video streaming traffic and should work well on most networks ... etc.
Related Documentation (optional) ???
Additional context why not a number like 9000 (jumbo frames)