All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Jakub Kicinski' <kuba@kernel.org>, David Ahern <dsahern@kernel.org>
Cc: "menglong8.dong@gmail.com" <menglong8.dong@gmail.com>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"xeb@mail.ru" <xeb@mail.ru>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"yoshfuji@linux-ipv6.org" <yoshfuji@linux-ipv6.org>,
	"imagedong@tencent.com" <imagedong@tencent.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"kafai@fb.com" <kafai@fb.com>,
	"talalahmad@google.com" <talalahmad@google.com>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"alobakin@pm.me" <alobakin@pm.me>,
	"flyingpeng@tencent.com" <flyingpeng@tencent.com>,
	"mengensun@tencent.com" <mengensun@tencent.com>,
	"dongli.zhang@oracle.com" <dongli.zhang@oracle.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Biao Jiang <benbjiang@tencent.com>
Subject: RE: [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv()
Date: Wed, 16 Mar 2022 10:12:00 +0000	[thread overview]
Message-ID: <5f73ddd6ee4940d79e846a0eb624c73f@AcuMS.aculab.com> (raw)
In-Reply-To: <20220315215553.676a5d24@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

From: Jakub Kicinski
> Sent: 16 March 2022 04:56
> 
> On Tue, 15 Mar 2022 21:49:01 -0600 David Ahern wrote:
> > >>  	ver = skb->data[1]&0x7f;
> > >> -	if (ver >= GREPROTO_MAX)
> > >> +	if (ver >= GREPROTO_MAX) {
> > >> +		reason = SKB_DROP_REASON_GRE_VERSION;
> > >
> > > TBH I'm still not sure what level of granularity we should be shooting
> > > for with the reasons. I'd throw all unexpected header values into one
> > > bucket, not go for a reason per field, per protocol. But as I'm said
> > > I'm not sure myself, so we can keep what you have..
> >
> > I have stated before I do not believe every single drop point in the
> > kernel needs a unique reason code. This is overkill. The reason augments
> > information we already have -- the IP from kfree_skb tracepoint.
> 
> That's certainly true. I wonder if there is a systematic way of
> approaching these additions that'd help us picking the points were
> we add reasons less of a judgment call.

Is it worth considering splitting the 'reason' into two parts?
Eg x << 16 | y
One part being the overall reason - and probably a define.
The other qualifying the actual failing test and probably just
being a number.

Then you get an overall view of the fails (which might even
be counted) while still being able to locate the actual
failing test.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2022-03-16 10:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 13:33 [PATCH net-next 0/3] net: gre: add skb drop reasons to gre packet receive menglong8.dong
2022-03-14 13:33 ` [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv() menglong8.dong
2022-03-16  3:08   ` Jakub Kicinski
2022-03-16  3:49     ` David Ahern
2022-03-16  4:53       ` Menglong Dong
2022-03-16 14:45         ` David Ahern
2022-03-16  4:55       ` Jakub Kicinski
2022-03-16 10:12         ` David Laight [this message]
2022-03-16 18:55           ` Jakub Kicinski
2022-03-16 14:56         ` David Ahern
2022-03-16 18:57           ` Jakub Kicinski
2022-03-16 21:05             ` David Ahern
2022-03-16  4:41     ` Menglong Dong
2022-03-16  4:50       ` Jakub Kicinski
2022-03-14 13:33 ` [PATCH net-next 2/3] net: ipgre: make erspan_rcv() return PACKET_NEXT menglong8.dong
2022-03-14 13:33 ` [PATCH net-next 3/3] net: ipgre: add skb drop reasons to gre_rcv() menglong8.dong
2022-03-16  3:17   ` Jakub Kicinski
2022-03-16  6:21     ` Menglong Dong
2022-03-16 18:50       ` Jakub Kicinski
2022-03-16 18:51       ` Jakub Kicinski

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=5f73ddd6ee4940d79e846a0eb624c73f@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=alobakin@pm.me \
    --cc=benbjiang@tencent.com \
    --cc=davem@davemloft.net \
    --cc=dongli.zhang@oracle.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=flyingpeng@tencent.com \
    --cc=imagedong@tencent.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mengensun@tencent.com \
    --cc=menglong8.dong@gmail.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=talalahmad@google.com \
    --cc=xeb@mail.ru \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.