B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Nora Schiffer <neocturne@universe-factory.net>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH batadv] batman-adv: gw: don't deselect gateway with active hardif
Date: Wed, 10 Jun 2026 20:35:00 +0200	[thread overview]
Message-ID: <6276013.lOV4Wx5bFT@sven-desktop> (raw)
In-Reply-To: <658521a4-cbcf-4f71-b5ee-586bec229bd4@universe-factory.net>

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

On Wednesday, 10 June 2026 19:50:12 CEST Nora Schiffer wrote:
[...]
> >   	/* nobody uses this interface anymore */
> > -	if (batadv_hardif_cnt(hard_iface->mesh_iface) <= 1)
> > +	if (batadv_hardif_cnt(hard_iface->mesh_iface) == 0)
> >   		batadv_gw_check_client_stop(bat_priv);
> 
> The change looks correct, but this is the only remaining user of 
> batadv_hardif_cnt(), and it's only checking if there aren't any hardifs, so 
> this could avoid counting altogether and just use
> 
> 	if (list_empty(&hard_iface->mesh_iface->adj_list.lower))
> 
> and drop batadv_hardif_cnt().

Good point. Will submit a new version.

> We are holding RTNL here, right?

Yes, all callers are holding RTNL.

Regards,
	Sven

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

      reply	other threads:[~2026-06-10 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07 12:57 [PATCH batadv] batman-adv: gw: don't deselect gateway with active hardif Sven Eckelmann
2026-06-10 17:50 ` Nora Schiffer
2026-06-10 18:35   ` 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=6276013.lOV4Wx5bFT@sven-desktop \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=neocturne@universe-factory.net \
    /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