BPF List
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: "Alexei Starovoitov" <ast@kernel.org>,
	bpf@vger.kernel.org, "Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH v3 net-next 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info
Date: Mon, 6 Dec 2021 16:04:12 +0100	[thread overview]
Message-ID: <1685fbab-e4e1-5116-5148-fa7cd8f5879b@iogearbox.net> (raw)
In-Reply-To: <70c5f1a6ecdc67586d108ab5ebed4be6febf8423.camel@redhat.com>

On 12/6/21 11:20 AM, Paolo Abeni wrote:
> On Fri, 2021-12-03 at 23:04 +0100, Daniel Borkmann wrote:
>> Hi Paolo,
>>
>> Changes look good to me as well, we can route the series via bpf-next after tree
>> resync, or alternatively ask David/Jakub to take it directly into net-next with our
>> Ack given in bpf-next there is no drivers/net/ethernet/microsoft/mana/mana_bpf.c yet.
>>
>> On 11/30/21 11:08 AM, Paolo Abeni wrote:
>> [...]> diff --git a/net/core/filter.c b/net/core/filter.c
>>> index 5631acf3f10c..392838fa7652 100644
>>> --- a/net/core/filter.c
>>> +++ b/net/core/filter.c
>>> @@ -8181,13 +8181,13 @@ static bool xdp_is_valid_access(int off, int size,
>>>    	return __is_valid_xdp_access(off, size);
>>>    }
>>>    
>>> -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 ? dev->name : "");
>>
>> One tiny nit, but we could fix it up while applying I'd have is that for !dev case
>> we should probably dump a "<n/a>" or so just to avoid a kernel log message like
>> "dev , expect packet loss".
> 
> Yep, that would probably be better. Pleas let me know it you prefer a
> formal new version for the patch.

Ok, I think no need, we can take care of it when applying.

Thanks,
Daniel

  reply	other threads:[~2021-12-06 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 10:08 [PATCH v3 net-next 0/2] bpf: do not WARN in bpf_warn_invalid_xdp_action() Paolo Abeni
2021-11-30 10:08 ` [PATCH v3 net-next 1/2] " Paolo Abeni
2021-11-30 10:08 ` [PATCH v3 net-next 2/2] bpf: let bpf_warn_invalid_xdp_action() report more info Paolo Abeni
2021-11-30 11:33   ` Toke Høiland-Jørgensen
2021-12-03 22:04   ` Daniel Borkmann
2021-12-06 10:20     ` Paolo Abeni
2021-12-06 15:04       ` Daniel Borkmann [this message]
2021-12-13 21:51         ` Daniel Borkmann

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=1685fbab-e4e1-5116-5148-fa7cd8f5879b@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox