Bug #363
openBroadcast ELP smaller than specified in documention
0%
Description
Commit a4b88af77e28 ("batman-adv: ELP - adding basic infrastructure") added the ELP broadcast code. It transmits 16 byte ELP packets + 14 byte ethernet header as broadcast to announce itself. The actual specification talks about extra padding to increase the size significantly (300 bytes).
Either the code or the documentation has to be adjusted
Updated by Sven Eckelmann over 6 years ago
The underlying drivers will add some padding when it is required (60 bytes for ethernet). Here for example from visornic.
if (len < ETH_MIN_PACKET_SIZE && ((skb_end_pointer(skb) - skb->data) >= ETH_MIN_PACKET_SIZE)) { /* pad the packet out to minimum size */ padlen = ETH_MIN_PACKET_SIZE - len; memset(&skb->data[len], 0, padlen); skb->tail += padlen; skb->len += padlen; len += padlen; firstfraglen += padlen; }
But still, the ELP documentation talks about a lot more (300 bytes) and not only 60 bytes.
Updated by Antonio Quartulli over 6 years ago
I am not sure about what was the goal of that section. For sure, smaller broadcast packets should have a higher chance of being received (and avoid collisions). This is probably why we don't pad and we "let the underneath driver take care of it".
Now I am surprised that some drivers don't do that. After all, the minimum packet size is a driver/hw constraint, so why should an upper layer protocol takecare of it? As you said, between batman-adv and the HW there could be other layers which we are not aware of.
Updated by Sven Eckelmann over 6 years ago
- Subject changed from Broadcast ELP smaller than minimal ethernet packet size to Broadcast ELP smaller than specified in documention
- Description updated (diff)
Ok, changed the bug description to only talk about the specification. The minimal ethernet size should not be relevant here.