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 v3 5/5] batman-adv: mcast: shrink tracker packet after scrubbing
Date: Tue, 27 Dec 2022 11:46:30 +0100	[thread overview]
Message-ID: <3853699.MHq7AAxBmi@sven-l14> (raw)
In-Reply-To: <20221226204237.10403-6-linus.luessing@c0d3.blue>

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

On Monday, 26 December 2022 21:42:37 CET Linus Lüssing wrote:
> Remove all zero MAC address entries (00:00:00:00:00:00) from a multicast
> packet's tracker TVLV before transmitting it and update all headers
> accordingly. This way, instead of keeping the multicast packet at a
> constant size throughout its journey through the mesh, it will become
> more lightweight, smaller with every interested receiver on the way and
> on each splitting intersection. Which can save some valuable bandwidth.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---
>  net/batman-adv/multicast_forw.c | 212 ++++++++++++++++++++++++++++++++
>  1 file changed, 212 insertions(+)

ecsv/pu: checkpatch ./net/batman-adv/multicast_forw.c
-----------------------------------------------------

    CHECK: Macro argument reuse 'num_dests' - possible side-effects?
    #35: FILE: ./net/batman-adv/multicast_forw.c:35:
    +#define batadv_mcast_forw_tracker_for_each_dest(dest, num_dests) \
    +   for (; num_dests; num_dests--, (dest) += ETH_ALEN)
    
    CHECK: Macro argument reuse 'num_dests' - possible side-effects?
    #38: FILE: ./net/batman-adv/multicast_forw.c:38:
    +#define batadv_mcast_forw_tracker_for_each_dest_rev(dest, num_dests) \
    +   for (; num_dests; num_dests--, (dest) -= ETH_ALEN)
    
    total: 0 errors, 0 warnings, 2 checks, 997 lines checked

ecsv/pu: headers
----------------

    diff --git a/net/batman-adv/multicast.h b/net/batman-adv/multicast.h
    index 0f0d79c8..4393c3a2 100644
    --- a/net/batman-adv/multicast.h
    +++ b/net/batman-adv/multicast.h
    @@ -11,6 +11,7 @@
     
     #include <linux/netlink.h>
     #include <linux/skbuff.h>
    +#include <linux/types.h>
     
     /**
      * enum batadv_forw_mode - the way a packet should be forwarded as

ecsv/pu: kerneldoc ./net/batman-adv/multicast_forw.c
----------------------------------------------------

    ./net/batman-adv/multicast_forw.c:86: warning: Function parameter or member 'bat_priv' not described in 'batadv_mcast_forw_push_dest'
    ./net/batman-adv/multicast_forw.c:401: warning: Function parameter or member 'bat_priv' not described in 'batadv_mcast_forw_push_tvlvs'
    ./net/batman-adv/multicast_forw.c:553: warning: Function parameter or member 'num_dests_remove' not described in 'batadv_mcast_forw_shrink_align_offset'
    ./net/batman-adv/multicast_forw.c:553: warning: Excess function parameter 'num_dests_reduce' description in 'batadv_mcast_forw_shrink_align_offset'
    ./net/batman-adv/multicast_forw.c:657: warning: Function parameter or member 'num_dests_reduce' not described in 'batadv_mcast_forw_shrink_update_headers'
    ./net/batman-adv/multicast_forw.c:657: warning: Excess function parameter 'num_dest_reduce' description in 'batadv_mcast_forw_shrink_update_headers'


> +static int batadv_mcast_forw_shrink_align_offset(unsigned int num_dests_old,
> +						 unsigned int num_dests_remove)
> +{
> +	int ret = sizeof(((struct batadv_tvlv_mcast_tracker *)0)->align);


sizeof_field from linux/stddef.h. Available there since v4.16. So you need to have a compat code commit which introduces it for older kernels.

Kind regards,
	Sven

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

      reply	other threads:[~2022-12-27 10:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26 20:42 [PATCH v3 0/5] Implementation of a Stateless Multicast Packet Type Linus Lüssing
2022-12-26 20:42 ` [PATCH v3 1/5] batman-adv: mcast: remove now redundant single ucast forwarding Linus Lüssing
2022-12-26 20:42 ` [PATCH v3 2/5] batman-adv: tvlv: prepare for tvlv enabled multicast packet type Linus Lüssing
2022-12-26 20:42 ` [PATCH v3 3/5] batman-adv: mcast: implement multicast packet reception and forwarding Linus Lüssing
2022-12-27  9:07   ` Sven Eckelmann
2022-12-27 11:58     ` Linus Lüssing
2022-12-27 12:47       ` Sven Eckelmann
2022-12-26 20:42 ` [PATCH v3 4/5] batman-adv: mcast: implement multicast packet generation Linus Lüssing
2022-12-27  9:34   ` Sven Eckelmann
2022-12-26 20:42 ` [PATCH v3 5/5] batman-adv: mcast: shrink tracker packet after scrubbing Linus Lüssing
2022-12-27 10:46   ` Sven Eckelmann [this message]

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=3853699.MHq7AAxBmi@sven-l14 \
    --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