public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@c0d3.blue>
Subject: Re: [PATCH v4 4/5] batman-adv: mcast: implement multicast packet generation
Date: Wed, 18 Jan 2023 22:15:35 +0100	[thread overview]
Message-ID: <6523978.yeldW9W7Dk@sven-desktop> (raw)
In-Reply-To: <20221227193409.13461-5-linus.luessing@c0d3.blue>

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

On Tuesday, 27 December 2022 20:34:08 CET Linus Lüssing wrote:
> Implement the preparation of a batman-adv multicast packet and use this
> under certain conditions.
> 
> For one thing this implements the capability to push a complete
> batman-adv multicast packet header, including a tracker TVLV with all
> originator destinations that have signaled interest in it, onto a given
> ethernet frame with an IP multicast packet inside.
> 
> For another checks are implemented to determine if encapsulating a
> multicast packet in this new batman-adv multicast packet type and using
> it is feasible. Those checks are:
> 
> 1) Have all nodes signaled that they are capable of handling the new
>    batman-adv multicast packet type?
> 2) Do all active hard interfaces of all nodes, including us, have an MTU
>    of at least 1280 bytes?
> 3) Does a complete multicast packet header with all its destination
>    addresses fit onto the given multicast packet / ethernet frame and
>    does not exceed 1280 bytes?
> 
> If all checks passed then the new batman-adv multicast packet type will
> be used for transmission and distribution. Otherwise we fall back to one or
> more batman-adv unicast packet transmissions, if possible. Or if not
> possible we will fall back to classic flooding through a batman-adv
> broadcast packet.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---
>  net/batman-adv/multicast.c      |  79 ++++-
>  net/batman-adv/multicast.h      |  25 +-
>  net/batman-adv/multicast_forw.c | 513 ++++++++++++++++++++++++++++++++
>  net/batman-adv/soft-interface.c |   6 +-
>  net/batman-adv/types.h          |   6 +
>  5 files changed, 621 insertions(+), 8 deletions(-)

Acked-by: Sven Eckelmann <sven@narfation.org>

Btw. it is spelled "outer" and not "outter"

[...]
> +/**
> + * batadv_mcast_forw_expand_head() - expand headroom for an mcast packet
> + * @bat_priv: the bat priv with all the soft interface information
> + * @skb: the multicast packet to send
> + *
> + * Tries to expand an skb's headroom so that its head to tail is 1298
> + * bytes (minimum IPv6 MTU + vlan ethernet header size) large.
> + *
> + * Return: -EINVAL if the given skb's length is too large or -ENOMEM on memory
> + * allocation failure. Otherwise, on success, zero is returned.
> + */
> +static int batadv_mcast_forw_expand_head(struct batadv_priv *bat_priv,
> +					 struct sk_buff *skb)
> +{
> +	int hdr_size = VLAN_ETH_HLEN + IPV6_MIN_MTU - skb->len;
> +
> +	 /* TODO: Could be tightened to actual number of destination nodes?
> +	  * But it's tricky, number of destinations might have increased since
> +	  * we last checked.
> +	  */


But it might at least be a good start. So basically a "we can at least 
guarantee that there is enough room for what we've seen in our precheck"

And you could make sure that we still have enough headroom for our lower 
devices. Not that we steal from the headroom which they need - because your 
headroom is not part of the needed_headroom which we report. But of course, we 
don't know the outgoing device (yet) - so this makes it harder to figure out 
how large we need to allocate it.


Kind regards,
	Sven

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

  reply	other threads:[~2023-01-18 21:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 19:34 [PATCH v4 0/5] Implementation of a Stateless Multicast Packet Type Linus Lüssing
2022-12-27 19:34 ` [PATCH v4 1/5] batman-adv: mcast: remove now redundant single ucast forwarding Linus Lüssing
2023-01-06 17:21   ` Sven Eckelmann
2022-12-27 19:34 ` [PATCH v4 2/5] batman-adv: tvlv: prepare for tvlv enabled multicast packet type Linus Lüssing
2023-01-06 17:54   ` Sven Eckelmann
2022-12-27 19:34 ` [PATCH v4 3/5] batman-adv: mcast: implement multicast packet reception and forwarding Linus Lüssing
2023-01-15 17:56   ` Sven Eckelmann
2023-01-16 18:31     ` Linus Lüssing
2023-01-19 12:47   ` Simon Wunderlich
2023-01-21 13:15     ` Linus Lüssing
2022-12-27 19:34 ` [PATCH v4 4/5] batman-adv: mcast: implement multicast packet generation Linus Lüssing
2023-01-18 21:15   ` Sven Eckelmann [this message]
2022-12-27 19:34 ` [PATCH v4 5/5] batman-adv: mcast: shrink tracker packet after scrubbing Linus Lüssing
2023-01-18 21:29   ` Sven Eckelmann
2023-01-27  9:26 ` [PATCH v4 0/5] Implementation of a Stateless Multicast Packet Type 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=6523978.yeldW9W7Dk@sven-desktop \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=linus.luessing@c0d3.blue \
    /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