Re: [PATCH v2] batman-adv: Introduce no noflood mark

Sven Eckelmann
2019-05-07T08:21:40Z

[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]

On Tuesday, 7 May 2019 10:00:18 CEST Marek Lindner wrote:
[...]
> > I still don't see why this has to be implemented in batman-adv and not as an
> > external filter (tc-ebpf or something like that).
>
> As I understand the use-case (Linus correct me if I am wrong): The mark is
> supposed to drop packets that couldn't be $optimized by one of the various
> batman-adv payload traffic optimizations. From outside of batman-adv it would be
> difficult to tell if a broadcast / multicast packet was optimized (think: served
> via DAT cache, sent as unicast, etc) or not.

It should be easy to see in tc whether a packet is transmitted as unicast or
broadcast. It is just a bit check in the destination mac. So it would end up
as a filter somewheere in the hardif tx path which first checks following
before rejecting a packet:

* is it a multicast/broadcast destination address?

- maybe this part isn't even necessary - at least the mcast2unicast stuff
uses batadv_send_skb_unicast

* is it a batman-adv packet?
* is is a batman-adv compat 15 broadcast packet?
* does it have the noflood mark?

This would even allow some fancy stuff like rate limiting or per hardif
behavior. With the problem that there is no package yet which does this in
gluon.

Or am I missing something essential here which is also done in the
batadv_interface_tx path?

And why would we see see stuff which as served via DAT? This is usually not
transmitted on the hardif ports.

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]