Subject: Re: [PATH net 1/2] net: ip: add drop reasons when handling ip fragments

From: Simon Horman <[email-masked]>
Date: Fri, 24 Oct 2025 16:57:23 +0100

On Thu, Oct 23, 2025 at 11:43:25PM -0700, Eric Dumazet wrote:
> On Thu, Oct 23, 2025 at 11:23 PM Yonglong Li <[email-masked]> wrote:
> >
> > 1, add new drop reason FRAG_FAILED, and use it in ip_do_fragment
> > 2, use drop reasons PKT_TOO_BIG in ip_fragment
> >
> > Signed-off-by: Yonglong Li <[email-masked]>
> > ---
> >  include/net/dropreason-core.h | 3 +++
> >  net/ipv4/ip_output.c          | 6 +++---
> >  2 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
> > index 58d91cc..7da80f4 100644
> > --- a/include/net/dropreason-core.h
> > +++ b/include/net/dropreason-core.h
> > @@ -99,6 +99,7 @@
> >         FN(DUP_FRAG)                    \
> >         FN(FRAG_REASM_TIMEOUT)          \
> >         FN(FRAG_TOO_FAR)                \
> > +       FN(FRAG_FAILED)                 \
> >         FN(TCP_MINTTL)                  \
> >         FN(IPV6_BAD_EXTHDR)             \
> >         FN(IPV6_NDISC_FRAG)             \
> > @@ -500,6 +501,8 @@ enum skb_drop_reason {
> >          * (/proc/sys/net/ipv4/ipfrag_max_dist)
> >          */
> >         SKB_DROP_REASON_FRAG_TOO_FAR,
> > +       /* do ip/ip6 fragment failed */

nit; This comment should be a Kernel doc, like the comments
     for other members of this enum.

> > +       SKB_DROP_REASON_FRAG_FAILED,
> >         /**
> >          * @SKB_DROP_REASON_TCP_MINTTL: ipv4 ttl or ipv6 hoplimit below
> >          * the threshold (IP_MINTTL or IPV6_MINHOPCOUNT).

...