From: Jakub Kicinski <kuba@kernel.org>
To: fw@strlen.de
Cc: netfilter-devel@vger.kernel.org, pabeni@redhat.com,
davem@davemloft.net, edumazet@google.com, netdev@vger.kernel.org,
pablo@netfilter.org
Subject: Re: [net-next,4/9] ipvs: do not keep dest_dst after dest is removed
Date: Wed, 25 Feb 2026 19:44:49 -0800 [thread overview]
Message-ID: <20260225194449.546cb6a1@kernel.org> (raw)
In-Reply-To: <20260226034124.1806970-1-kuba@kernel.org>
On Wed, 25 Feb 2026 19:41:24 -0800 Jakub Kicinski wrote:
> > - if (!rt_dev_is_down(dst_dev_rcu(&rt->dst)))
> > + if (!rt_dev_is_down(dst_dev_rcu(&rt->dst)) &&
> > + dest->flags & IP_VS_DEST_F_AVAILABLE)
> > __ip_vs_dst_set(dest, dest_dst, &rt->dst, 0);
>
> Should this be wrapped in parentheses?
>
> In C operator precedence, the logical AND (&&) binds more tightly than
> the bitwise AND (&). The expression here parses as:
>
> (!rt_dev_is_down(...) && dest->flags) & IP_VS_DEST_F_AVAILABLE
>
> This works correctly only because IP_VS_DEST_F_AVAILABLE is 0x0001, and
> the logical AND produces 0 or 1, so the bitwise AND with 0x0001 still
> produces the expected result.
Ah, should have skipped this one. It is of course bs. Chris reported
it to the developers of the model.
next prev parent reply other threads:[~2026-02-26 3:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 20:50 [PATCH net-next 0/9] netfilter: updates for net-next Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 1/9] ipvs: make ip_vs_svc_table and ip_vs_svc_fwm_table per netns Florian Westphal
2026-02-26 3:41 ` [net-next,1/9] " Jakub Kicinski
2026-02-26 19:19 ` Julian Anastasov
2026-02-24 20:50 ` [PATCH net-next 2/9] ipvs: some service readers can use RCU Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 3/9] ipvs: use single svc table Florian Westphal
2026-02-26 3:41 ` [net-next,3/9] " Jakub Kicinski
2026-02-24 20:50 ` [PATCH net-next 4/9] ipvs: do not keep dest_dst after dest is removed Florian Westphal
2026-02-26 3:41 ` [net-next,4/9] " Jakub Kicinski
2026-02-26 3:44 ` Jakub Kicinski [this message]
2026-02-24 20:50 ` [PATCH net-next 5/9] ipvs: use more counters to avoid service lookups Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 6/9] ipvs: no_cport and dropentry counters can be per-net Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 7/9] netfilter: nft_set_rbtree: don't disable bh when acquiring tree lock Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 8/9] netfilter: nf_tables: drop obsolete EXPORT_SYMBOLs Florian Westphal
2026-02-24 20:50 ` [PATCH net-next 9/9] netfilter: nf_tables: remove register tracking infrastructure Florian Westphal
2026-02-26 3:50 ` [PATCH net-next 0/9] netfilter: updates for net-next patchwork-bot+netdevbpf
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=20260225194449.546cb6a1@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/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