All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, "Alexei Starovoitov" <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	bpf@vger.kernel.org, "Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH net-next v2 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info
Date: Mon, 29 Nov 2021 15:56:33 +0100	[thread overview]
Message-ID: <5f96722557fbde5b9711da8d53c709858c03af47.camel@redhat.com> (raw)
In-Reply-To: <8f6f900b2b48aaedf031b20a7831ec193793768b.camel@redhat.com>

Hello,

On Fri, 2021-11-26 at 19:57 +0100, Paolo Abeni wrote:
> On Fri, 2021-11-26 at 10:19 -0800, Jakub Kicinski wrote:
> > On Fri, 26 Nov 2021 12:19:11 +0100 Paolo Abeni wrote:
> > > -void bpf_warn_invalid_xdp_action(u32 act)
> > > +void bpf_warn_invalid_xdp_action(struct net_device *dev, struct bpf_prog *prog, u32 act)
> > >  {
> > >  	const u32 act_max = XDP_REDIRECT;
> > >  
> > > -	pr_warn_once("%s XDP return value %u, expect packet loss!\n",
> > > +	pr_warn_once("%s XDP return value %u on prog %s (id %d) dev %s, expect packet loss!\n",
> > >  		     act > act_max ? "Illegal" : "Driver unsupported",
> > > -		     act);
> > > +		     act, prog->aux->name, prog->aux->id, dev->name ? dev->name : "");
> > >  }
> > 
> > Since we have to touch all the drivers each time the prototype of this
> > function is changed - would it make sense to pass in rxq instead? It has
> > more info which may become useful at some point.
> 
> I *think* for this specific scenario the device name provides all the
> necessary info - the users need to know the driver causing the issue.
> 
> Others similar xdp helpers - e.g. trace_xdp_exception() - have the same
> arguments list used here. If the rxq is useful I guess we will have to
> change even them, and touch all the drivers anyway.

Following the above reasoning I'm going to post v3 with the same
argument list used here, unless someone stops me soon ;)

Thanks,

Paolo


  reply	other threads:[~2021-11-29 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 11:19 [PATCH net-next v2 0/2] bpf: do not WARN in bpf_warn_invalid_xdp_action() Paolo Abeni
2021-11-26 11:19 ` [PATCH net-next v2 1/2] " Paolo Abeni
2021-11-26 11:19 ` [PATCH net-next v2 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info Paolo Abeni
2021-11-26 12:03   ` Toke Høiland-Jørgensen
2021-11-26 18:19   ` Jakub Kicinski
2021-11-26 18:57     ` Paolo Abeni
2021-11-29 14:56       ` Paolo Abeni [this message]
2021-11-29 15:12         ` Jakub Kicinski
2021-11-26 20:55   ` kernel test robot
2021-11-26 20:55     ` kernel test robot

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=5f96722557fbde5b9711da8d53c709858c03af47.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=toke@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 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.