From: Sven Eckelmann <sven@narfation.org>
To: Ren Wei <n05ec@lzu.edu.cn>
Cc: b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org,
marek.lindner@mailbox.org, sw@simonwunderlich.de,
antonio@mandelbit.com, sven@narfation.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, yuantan098@gmail.com, yifanwucs@gmail.com,
tomapufckgml@gmail.com, bird@lzu.edu.cn,
wangjiexun2025@gmail.com
Subject: Re: [PATCH net 1/1] batman-adv: stop caching unowned originator pointers in BAT IV
Date: Sun, 03 May 2026 10:30:28 +0200 [thread overview]
Message-ID: <177779702879.645574.14368201380729825498.b4-review@b4> (raw)
In-Reply-To: <e12a51ee998808be6381780d6aaf32e093dc7d1e.1777692024.git.wangjiexun2025@gmail.com>
On Sun, 03 May 2026 12:28:58 +0800, Ren Wei <n05ec@lzu.edu.cn> wrote:
> [...]
> Reported-by: Yuan Tan <yuantan098@gmail.com>
> Reported-by: Yifan Wu <yifanwucs@gmail.com>
> Reported-by: Juefei Pu <tomapufckgml@gmail.com>
> Reported-by: Xin Liu <bird@lzu.edu.cn>
> Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
This looks half finished from the types perspective:
net/batman-adv/bat_v_ogm.c:
713 | if (router && router->orig_node != orig_node && !orig_neigh_router) {
net/batman-adv/originator.c:
697 | neigh_node->orig_node = orig_node;
net/batman-adv/types.h:
631 | struct batadv_orig_node *orig_node;
Not sure if __private and ACCESS_PRIVATE() would be an option - just to handle
this non-deref comparison while still allowing a fast comparison of the pointer
value.
I don't want to make this a show-stopper - just a possibility to think about
this for a moment. Especially because I am waiting for some info about the
sashiko.dev "Embargoed" state
>
>
> diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
> index f28e9cbf..168b413d 100644
> --- a/net/batman-adv/bat_iv_ogm.c
> +++ b/net/batman-adv/bat_iv_ogm.c
> @@ -906,6 +899,31 @@ static u8 batadv_iv_orig_ifinfo_sum(struct batadv_orig_node *orig_node,
> [ ... skip 22 lines ... ]
> + sum = batadv_iv_orig_ifinfo_sum(orig_neigh, neigh_node->if_incoming);
> + batadv_orig_node_put(orig_neigh);
> +
> + return sum;
> +}
> +
@Marek, @Simon, Maybe you can also get a good cup of tea and think (besides
performance implications) think about other side effects.
--
Sven Eckelmann <sven@narfation.org>
next prev parent reply other threads:[~2026-05-03 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1777692024.git.wangjiexun2025@gmail.com>
2026-05-03 4:28 ` [PATCH net 1/1] batman-adv: stop caching unowned originator pointers in BAT IV Ren Wei
2026-05-03 8:30 ` Sven Eckelmann [this message]
2026-05-05 18:31 ` Sven Eckelmann
2026-05-06 12:39 ` Simon Horman
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=177779702879.645574.14368201380729825498.b4-review@b4 \
--to=sven@narfation.org \
--cc=antonio@mandelbit.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=bird@lzu.edu.cn \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=marek.lindner@mailbox.org \
--cc=n05ec@lzu.edu.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sw@simonwunderlich.de \
--cc=tomapufckgml@gmail.com \
--cc=wangjiexun2025@gmail.com \
--cc=yifanwucs@gmail.com \
--cc=yuantan098@gmail.com \
/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