b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH v2] batman-adv: add dynamic, bridged-in TT VID detection support
Date: Sun, 16 Jun 2024 22:38:22 +0200	[thread overview]
Message-ID: <Zm9NPkUOQuj93BQs@sellars> (raw)
In-Reply-To: <20240612213944.4169-1-linus.luessing@c0d3.blue>

On Wed, Jun 12, 2024 at 11:39:44PM +0200, Linus Lüssing wrote:
> So far, if we wanted to bridge VLAN tagged frames into the mesh one would
> need to manually create an according VLAN interface on top of bat0
> first, to trigger batman-adv to create the according structures
> for a VID.
> 
> With this change the VLAN from bridged-in clients is now automatically
> detected and added to the translation table on the fly.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---

Just wanted to add two more remarks / oddities I was stumbling
over when working on and testing this and reading the code.
Which might be something worth additional patches in the future.


Minor thing, in the following case I would have expected the
P/NOPURGE flag to be added, but it wasn't:

```
root@linus-work:/# batctl tl
[B.A.T.M.A.N. adv 2024.1-10-g2ee1b45a-dirty, MainIF/MAC: ens3/02:04:64:a4:39:c1 (bat0/02:11:00:00:00:01 BATMAN_V), TTVN: 12]
Client             VID Flags    Last seen (CRC       )
02:11:00:00:00:01   -1 [.P....]   0.000   (0x1350f3f4)
02:11:00:00:00:02   -1 [......]   3.788   (0x1350f3f4)
root@linus-work:/# ip link set dev bat0 addr 02:11:00:00:00:02
root@linus-work:/# batctl tl
[B.A.T.M.A.N. adv 2024.1-10-g2ee1b45a-dirty, MainIF/MAC: ens3/02:04:64:a4:39:c1 (bat0/02:11:00:00:00:02 BATMAN_V), TTVN: 13]
Client             VID Flags    Last seen (CRC       )
02:11:00:00:00:02   -1 [......]   1.872   (0x8d84de4b)
root@linus-work:/#
```

Don't see a functional issue right now though. If it were timing
out and deleted and then a frame is sent from bat0 then it would
be readded with the P/NOPURGE flag.


Secondly, discovered this yesterday when trying to add multiple
VIDs quickly like this:

```
for i in `seq 3 8`; do
	mz bat0 \
		-a 02:33:02:34:00:01 \
		-b bcast "81:00 00:0$i 08:00 ca:fe:ca:fe"
	sleep 1
done
```

Then this won't work. Whenever adding a new VID broadcast
traffic seems to stale for 30 seconds from this node
due to the "num requests in flight" check in batadv_bla_tx():
https://git.open-mesh.org/batman-adv.git/blob/36cfdc4401412d5a00231b1fd65a95ac71111035:/net/batman-adv/bridge_loop_avoidance.c#l2052

So repeating that command every 30 seconds will add one more VID
every time. Then after 6x 30 seconds you could use all VIDs as
expected, as long as they don't time out.
With "batctl bl 0" no such delay + broadcast filtering happens and VIDs would be usable
immediately with that loop for the mausezahn command.
-> Might make sense to make bat_priv->bla.num_requests per
   VLAN in the future instead? (would that make sense?
   or am I missing something else or an easier solution?)

Regards, Linus

  reply	other threads:[~2024-06-16 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 21:39 [PATCH v2] batman-adv: add dynamic, bridged-in TT VID detection support Linus Lüssing
2024-06-16 20:38 ` Linus Lüssing [this message]
2024-07-12 22:13   ` Linus Lüssing

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=Zm9NPkUOQuj93BQs@sellars \
    --to=linus.luessing@c0d3.blue \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).