Project

General

Profile

Actions

Bug #363

open

Broadcast ELP smaller than specified in documention

Added by Sven Eckelmann over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
08/31/2018
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Sven Eckelmann over 5 years ago

  • Description updated (diff)
Actions #2

Updated by Sven Eckelmann over 5 years ago

  • Description updated (diff)
Actions #3

Updated by Sven Eckelmann over 5 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.

Actions #4

Updated by Antonio Quartulli over 5 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.

Actions #5

Updated by Sven Eckelmann over 5 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.

Actions

Also available in: Atom PDF