[0/5] batman-adv: Bitmap helper and size handling cleanup for aggregations

Message ID 20250202-bitmap_aggregation-v1-0-6542a10e6fad@narfation.org (mailing list archive)
Headers
Series batman-adv: Bitmap helper and size handling cleanup for aggregations |

Message

Sven Eckelmann Feb. 2, 2025, 4:04 p.m. UTC
  The B.A.T.M.A.N. IV code enforced a limit on the size of an aggregated OGM
packet due to some self written (inline) code to perform bit operations on
an simple unsigned integer. The comment which explained this was too vague
to really understand the size limitations of the u32 vs. the packet size.

By using the Linux bitmap helpers, it is possible to untangle the maximum
number of fragmented packets from the maximum size of an aggregate. Which
can make the aggregation code more flexible for tests and maybe better
airtime usage in the future.

At the same time, it was noticed that the size handling code was slightly
off. For the RX side, the size of the aggregation was limited. And for the
TX side, it didn't consider the MTU for the outgoing interface.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Sven Eckelmann (5):
      batman-adv: Limit number of aggregated packets directly
      batman-adv: Switch to bitmap helper for aggregation handling
      batman-adv: Use actual packet count for aggregated packets
      batman-adv: Ignore own maximum aggregation size during RX
      batman-adv: Limit aggregation size to outgoing MTU

 net/batman-adv/bat_iv_ogm.c | 43 +++++++++++++++++++++++++------------------
 net/batman-adv/bat_v_ogm.c  |  3 +--
 net/batman-adv/main.h       |  4 +---
 net/batman-adv/send.c       |  2 +-
 net/batman-adv/types.h      |  2 +-
 5 files changed, 29 insertions(+), 25 deletions(-)
---
base-commit: dfdce35d69c55b6b5d017a7e800e553089a26eb9
change-id: 20250202-bitmap_aggregation-dd6046fbc5dc

Best regards,