b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [PATCH 0/5] batman-adv: Bitmap helper and size handling cleanup for aggregations
Date: Sun, 02 Feb 2025 17:04:09 +0100	[thread overview]
Message-ID: <20250202-bitmap_aggregation-v1-0-6542a10e6fad@narfation.org> (raw)

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,
-- 
Sven Eckelmann <sven@narfation.org>


             reply	other threads:[~2025-02-02 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-02 16:04 Sven Eckelmann [this message]
2025-02-02 16:04 ` [PATCH 1/5] batman-adv: Limit number of aggregated packets directly Sven Eckelmann
2025-02-02 16:04 ` [PATCH 2/5] batman-adv: Switch to bitmap helper for aggregation handling Sven Eckelmann
2025-02-02 16:04 ` [PATCH 3/5] batman-adv: Use actual packet count for aggregated packets Sven Eckelmann
2025-02-02 16:04 ` [PATCH 4/5] batman-adv: Ignore own maximum aggregation size during RX Sven Eckelmann
2025-02-02 16:04 ` [PATCH 5/5] batman-adv: Limit aggregation size to outgoing MTU Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250202-bitmap_aggregation-v1-0-6542a10e6fad@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).