Netdev List
 help / color / mirror / Atom feed
From: Junjie Cao <junjie.cao@intel.com>
To: David Ahern <dsahern@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, idosch@nvidia.com,
	fmancera@suse.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: dropreason: add SKB_DROP_REASON_IP_TTL_EXCEEDED
Date: Tue,  1 Sep 2026 10:50:32 +0800	[thread overview]
Message-ID: <20260901025032.418077-1-junjie.cao@intel.com> (raw)
In-Reply-To: <7afff157-a5ed-459a-9b40-47123efd71e1@kernel.org>

On Mon, Aug 31, 2026 at 8:23 PM David Ahern <dsahern@kernel.org> wrote:
> what about icmp_unreach, ip_expire, and other sources of
> ICMP_TIME_EXCEEDED? The reason code applies to more than just forwarding
> paths.

ip_expire and ip6frag_expire_frag_queue already report
FRAG_REASM_TIMEOUT. That is the reassembly timer (code FRAGTIME), not a
TTL, so it stays.

icmp_unreach is the receiver of a time-exceeded; no packet expires
there.

That leaves IPVS decrement_ttl(): it sends the ICMP, and the callers
then free the skb at their tx_error labels with plain kfree_skb(). A
reason there has to come out of __ip_vs_get_out_rt(), so that is a
separate patch.

> similarly for IPv6, there are more ICMPV6_TIME_EXCEED cases than just
> the forwarding path.

Same picture: frag expiry has FRAG_REASM_TIMEOUT, IPVS is the gap, and
ip6_err_gen_icmpv6_unreach only translates a received v4 error for sit
and gre.

The kernel-doc says "on a packet being forwarded"; v3 drops the
qualifier.

      reply	other threads:[~2026-09-01  2:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  2:06 [PATCH net-next v2] net: dropreason: add SKB_DROP_REASON_IP_TTL_EXCEEDED Junjie Cao
2026-09-01  2:23 ` David Ahern
2026-09-01  2:50   ` Junjie Cao [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=20260901025032.418077-1-junjie.cao@intel.com \
    --to=junjie.cao@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=fmancera@suse.de \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@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