Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

batman-adv: Add support for jumbo frames

Since batman-adv is not actually depending on hardware capabilities, it has
no limit on the MTU. Only the lower hard interfaces can limit it. In case
these have an high enough MTU or fragmentation is enabled, a higher MTU
than 1500 can be enabled.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>

authored by

Sven Eckelmann and committed by
Simon Wunderlich
1666951c 00b35530

+5 -4
+1 -3
net/batman-adv/hard-interface.c
··· 618 618 619 619 /* the real soft-interface MTU is computed by removing the payload 620 620 * overhead from the maximum amount of bytes that was just computed. 621 - * 622 - * However batman-adv does not support MTUs bigger than ETH_DATA_LEN 623 621 */ 624 - return min_t(int, min_mtu - batadv_max_header_len(), ETH_DATA_LEN); 622 + return min_t(int, min_mtu - batadv_max_header_len(), BATADV_MAX_MTU); 625 623 } 626 624 627 625 /**
+2
net/batman-adv/main.h
··· 22 22 #define BATADV_THROUGHPUT_MAX_VALUE 0xFFFFFFFF 23 23 #define BATADV_JITTER 20 24 24 25 + #define BATADV_MAX_MTU (ETH_MAX_MTU - batadv_max_header_len()) 26 + 25 27 /* Time To Live of broadcast messages */ 26 28 #define BATADV_TTL 50 27 29
+2 -1
net/batman-adv/soft-interface.c
··· 790 790 atomic_set(&bat_priv->log_level, 0); 791 791 #endif 792 792 atomic_set(&bat_priv->fragmentation, 1); 793 - atomic_set(&bat_priv->packet_size_max, ETH_DATA_LEN); 793 + atomic_set(&bat_priv->packet_size_max, BATADV_MAX_MTU); 794 794 atomic_set(&bat_priv->bcast_queue_left, BATADV_BCAST_QUEUE_LEN); 795 795 atomic_set(&bat_priv->batman_queue_left, BATADV_BATMAN_QUEUE_LEN); 796 796 ··· 1043 1043 * have not been initialized yet 1044 1044 */ 1045 1045 dev->mtu = ETH_DATA_LEN; 1046 + dev->max_mtu = BATADV_MAX_MTU; 1046 1047 1047 1048 /* generate random address */ 1048 1049 eth_hw_addr_random(dev);