From: Simon Horman <horms@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] ipv6: fix _DEVADD() and _DEVUPD() macros
Date: Sun, 23 Mar 2025 16:53:45 +0000 [thread overview]
Message-ID: <20250323165345.GS892515@horms.kernel.org> (raw)
In-Reply-To: <20250319212516.2385451-1-edumazet@google.com>
On Wed, Mar 19, 2025 at 09:25:16PM +0000, Eric Dumazet wrote:
> ip6_rcv_core() is using:
>
> __IP6_ADD_STATS(net, idev,
> IPSTATS_MIB_NOECTPKTS +
> (ipv6_get_dsfield(hdr) & INET_ECN_MASK),
> max_t(unsigned short, 1, skb_shinfo(skb)->gso_segs));
>
> This is currently evaluating both expressions twice.
>
> Fix _DEVADD() and _DEVUPD() macros to evaluate their arguments once.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-23 16:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 21:25 [PATCH net-next] ipv6: fix _DEVADD() and _DEVUPD() macros Eric Dumazet
2025-03-23 16:53 ` Simon Horman [this message]
2025-03-25 15:00 ` 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=20250323165345.GS892515@horms.kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@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;
as well as URLs for NNTP newsgroup(s).