mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Sam McNally <sammc@google.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] ipv4: route: do not allocate unreachable dst for non-IP packets
Date: Sun, 29 Nov 2026 10:59:55 +0200	[thread overview]
Message-ID: <20261129085955.GA594066@shredder> (raw)
In-Reply-To: <20261126024858.4013811-1-sammc@google.com>

On Thu, Nov 26, 2026 at 01:48:58PM +1100, Sam McNally wrote:
> When ip_route_input_slow() reaches no_route: (from a missing FIB entry
> or !IN_DEV_FORWARD(in_dev) for a non-local target), falling through to
> local_input: allocates an uncached RTN_UNREACHABLE rtable
> (dst.input = ip_error), increments in_slow_tot, inserts it into
> rt_uncached_list under spin_lock_bh(), and attaches it via
> skb_dst_set().
> 
> Non-IPv4 callers such as arp_process() never invoke dst_input(skb) to
> send ICMP errors; they ignore RTN_UNREACHABLE and release the dst in
> consume_skb(), unlinking it from rt_uncached_list under spin_lock_bh()
> and queuing dst_destroy_rcu() via call_rcu_hurry(), which wakes RCU
> kthreads immediately since
> commit 483c26ff63f4 ("net: Use call_rcu_hurry() for dst_release()").
> 
> Return SKB_DROP_REASON_INVALID_PROTO at no_route: when skb->protocol !=
> htons(ETH_P_IP), matching brd_input: and ip_mc_validate_source(), while
> preserving ip_route_input_noref() rp_filter source validation when tip
> is RTN_LOCAL.
> 
> Observed during idle power testing on CONFIG_RCU_LAZY=y systems, where
> background broadcast ARP traffic with IPv4 forwarding disabled
> repeatedly woke RCU kthreads. Tested on x86_64 and arm64 under
> synthetic broadcast ARP load (~45 ARPs/s) and live /16 network traffic
> (~20-40 ARPs/s): live in_slow_tot dropped by >95% and 60s idle
> rcu_preempt wakeups fell by ~70% on arm64 and ~75-88% on x86_64,
> raising x86_64 package C10 residency from 62.5% to 84.6% and saving
> ~100-250 mW of SoC package power. An AI coding assistant was used to
> help analyze the code path and draft the patch and changelog.
> 
> Signed-off-by: Sam McNally <sammc@google.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

      reply	other threads:[~2026-11-29  9:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  2:48 Sam McNally
2026-11-29  8:59 ` Ido Schimmel [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=20261129085955.GA594066@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sammc@google.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

all inboxes | Powered by JetHome®