batman-adv: Limit number of aggregated packets directly
authorSven Eckelmann <sven@narfation.org>
Sun, 2 Feb 2025 16:04:10 +0000 (17:04 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sat, 22 Feb 2025 10:36:25 +0000 (11:36 +0100)
commit434becf57bdc89f939db635ed3337b9d1da5967e
treed6a118b79259b4e2413e06c26cfcd209515b4802
parent94433355027db60005551310975de94978549783
batman-adv: Limit number of aggregated packets directly

The currently selected size in BATADV_MAX_AGGREGATION_BYTES (512) is chosen
such that the number of possible aggregated packets is lower than 32. This
number must be limited so that the type of
batadv_forw_packet->direct_link_flags has enough bits to represent each
packet (with the size of at least 24 bytes).

This requirement is better implemented in code instead of having it inside
a comment.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_iv_ogm.c
net/batman-adv/main.h