netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	bpf@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info
Date: Mon, 15 Nov 2021 18:09:28 +0100	[thread overview]
Message-ID: <87zgq5mjlj.fsf@toke.dk> (raw)
In-Reply-To: <1b9bf5f4327699c74f93c297433012400769a60f.camel@redhat.com>

Paolo Abeni <pabeni@redhat.com> writes:

>> > -	pr_warn_once("%s XDP return value %u, expect packet loss!\n",
>> > +	pr_warn_once("%s XDP return value %u on prog %d dev %s attach type %d, expect packet loss!\n",
>> >  		     act > act_max ? "Illegal" : "Driver unsupported",
>> > -		     act);
>> > +		     act, prog->aux->id, dev->name, prog->expected_attach_type);
>> 
>> This will only ever trigger once per reboot even if the message differs,
>> right? Which makes it less useful as a debugging aid; so I'm not sure if
>> it's really worth it with this intrusive change unless we also do
>> something to add a proper debugging aid (like a tracepoint)...
>
> Yes, the idea would be to add a tracepoint there, if there is general
> agreement about this change.
>
> I think this patch is needed because the WARN_ONCE splat gives
> implicitly information about the related driver and attach type.
> Replacing with a simple printk we lose them.

Ah, right, good point. Pointing that out in the commit message might be
a good idea; otherwise people may miss that ;)

-Toke


  reply	other threads:[~2021-11-15 17:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 16:10 [RFC PATCH 0/2] bpf: do not WARN in bpf_warn_invalid_xdp_action() Paolo Abeni
2021-11-15 16:10 ` [RFC PATCH 1/2] " Paolo Abeni
2021-11-15 16:20   ` Toke Høiland-Jørgensen
2021-11-15 16:10 ` [RFC PATCH 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info Paolo Abeni
2021-11-15 16:24   ` Toke Høiland-Jørgensen
2021-11-15 17:00     ` Paolo Abeni
2021-11-15 17:09       ` Toke Høiland-Jørgensen [this message]
2021-11-18  0:48         ` Alexei Starovoitov
2021-11-18 11:11           ` Paolo Abeni
2021-11-18 11:50             ` Toke Høiland-Jørgensen
2021-11-18 21:52               ` Alexei Starovoitov

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=87zgq5mjlj.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --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;
as well as URLs for NNTP newsgroup(s).