public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Gabriel Goller <g.goller@proxmox.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	David Ahern <dsahern@kernel.org>,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ipv6: add `force_forwarding` sysctl to enable per-interface forwarding
Date: Wed, 2 Jul 2025 18:17:44 +0200	[thread overview]
Message-ID: <6a42127f-77bd-4a25-af61-8bb8adb666c1@6wind.com> (raw)
In-Reply-To: <20250702091055.3d70a5ee@kernel.org>

Le 02/07/2025 à 18:10, Jakub Kicinski a écrit :
> On Wed, 2 Jul 2025 17:14:42 +0200 Nicolas Dichtel wrote:
>>> Should we invert the polarity? It appears that the condition below only
>>> let's this setting _disable_ forwarding. IMO calling it "force" suggests
>>> to the user that it will force it to be enabled.  
>> Not sure to follow you. When force_forwarding is set to 1 the forwarding is
>> always enabled.
>>
>> sysctl | all.forwarding | iface.force_forwarding | packet processing from iface
>>        |      0         |           0            |        no forward
>>        |      0         |           1            |         forward
>>        |      1         |           0            |         forward
>>        |      1         |           1            |         forward
> 
> Ugh, I can't read comparisons to zero.
> Let's switch to more sane logic:
> 
> 	if (idev && !READ_ONCE(idev->cnf.force_forwarding) &&
> 	    !READ_ONCE(net->ipv6.devconf_all->forwarding))
+1

  reply	other threads:[~2025-07-02 16:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02  7:46 [PATCH v3] ipv6: add `force_forwarding` sysctl to enable per-interface forwarding Gabriel Goller
2025-07-02 10:05 ` Nicolas Dichtel
2025-07-02 22:26   ` Randy Dunlap
2025-07-03  6:58     ` Nicolas Dichtel
2025-07-04  4:09       ` Randy Dunlap
2025-07-03 11:04   ` Gabriel Goller
2025-07-03 14:04     ` Nicolas Dichtel
2025-07-03 14:50       ` Gabriel Goller
2025-07-02 14:34 ` Jakub Kicinski
2025-07-02 15:14   ` Nicolas Dichtel
2025-07-02 16:10     ` Jakub Kicinski
2025-07-02 16:17       ` Nicolas Dichtel [this message]
2025-07-03 11:05       ` Gabriel Goller

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=6a42127f-77bd-4a25-af61-8bb8adb666c1@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=g.goller@proxmox.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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