netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Victor Nogueira <victor@mojatatu.com>,
	xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, paulb@nvidia.com,
	netdev@vger.kernel.org, kernel@mojatatu.com,
	martin.lau@linux.dev, bpf@vger.kernel.org
Subject: Re: [PATCH net-next 1/1] net/sched: Disambiguate verdict from return code
Date: Fri, 6 Oct 2023 06:32:33 -0700	[thread overview]
Message-ID: <20231006063233.74345d36@kernel.org> (raw)
In-Reply-To: <2ce3a5a1-375d-43a6-052d-d44d7b4a4bf8@iogearbox.net>

On Fri, 6 Oct 2023 13:18:40 +0200 Daniel Borkmann wrote:
> That should be possible with some work this way, agree. I've been toying a bit
> more on this issue, and actually there is an even better way which would cleanly
> solve all use cases and we likely would utilize it for bpf as well in future.
> I wasn't aware of it before, but the drop reason actually has per-subsystem infra
> already which so far only mac80211 and ovs makes use of.

FWIW I'm not sure if leaning into the subsys specific error codes for
something as core as TC is a good direction. I'd think that what
matters to the user is was it an intentional policy drop or some form
of an error / exception. More detailed info can come from stats.

Maybe I'm overly conservative because I don't care about debugging
mac80211 or ovs but do very much care about TC :) And I think Alastair 
(bpftrace) is working on auto-prettifying enums when bpftrace outputs
maps. So we can do something like:

$ bpftrace -e 'tracepoint:skb:kfree_skb { @[args->reason] = count(); }'
Attaching 1 probe...
^C

@[SKB_DROP_REASON_TC_INGRESS]: 2
@[SKB_CONSUMED]: 34

  ^^^^^^^^^^^^ names!!

Auto-magically.

Which will no longer work with the "pack multiple values into 
the reason" scheme of subsys-specific values :(

What I'm saying is that there is a trade-off here between providing 
as much info as possible vs basic user getting intelligible data..

  reply	other threads:[~2023-10-06 13:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 14:59 [PATCH net-next 1/1] net/sched: Disambiguate verdict from return code Victor Nogueira
2023-09-19 22:15 ` Daniel Borkmann
2023-09-19 23:20   ` Jamal Hadi Salim
2023-09-22  8:12     ` Daniel Borkmann
2023-09-25 23:01       ` Jamal Hadi Salim
2023-09-29 15:48         ` Daniel Borkmann
2023-10-02 19:54           ` Jamal Hadi Salim
2023-10-03  9:00             ` Daniel Borkmann
2023-10-03 12:46               ` Jamal Hadi Salim
2023-10-03 13:49                 ` Daniel Borkmann
2023-10-03 21:36                   ` Jamal Hadi Salim
2023-10-06 11:18                     ` Daniel Borkmann
2023-10-06 13:32                       ` Jakub Kicinski [this message]
2023-10-06 13:49                         ` Daniel Borkmann
2023-10-06 14:12                           ` Jakub Kicinski
2023-10-06 15:25                             ` Jamal Hadi Salim
2023-10-06 15:45                               ` Daniel Borkmann
2023-10-06 19:39                                 ` Jamal Hadi Salim
2023-10-06 19:59                                   ` Daniel Borkmann
2023-10-06 17:59                             ` Daniel Xu

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=20231006063233.74345d36@kernel.org \
    --to=kuba@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kernel@mojatatu.com \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paulb@nvidia.com \
    --cc=victor@mojatatu.com \
    --cc=xiyou.wangcong@gmail.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).