linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Hwang <hffilwlqm@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	john.fastabend@gmail.com, andrii@kernel.org,
	martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
	kpsingh@kernel.org, sdf@google.com, haoluo@google.com,
	jolsa@kernel.org, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, hawk@kernel.org, rostedt@goodmis.org,
	mhiramat@kernel.org, mykolal@fb.com, shuah@kernel.org,
	tangyeechou@gmail.com, kernel-patches-bot@fb.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v5 1/2] bpf, xdp: Add tracepoint to xdp attaching failure
Date: Wed, 2 Aug 2023 14:51:35 +0800	[thread overview]
Message-ID: <1483f6db-35a8-849b-9bda-00ad5aa81eff@gmail.com> (raw)
In-Reply-To: <20230801150826.6f617919@kernel.org>



On 2/8/23 06:08, Jakub Kicinski wrote:
> On Tue,  1 Aug 2023 22:26:20 +0800 Leon Hwang wrote:
>> When error happens in dev_xdp_attach(), it should have a way to tell
>> users the error message like the netlink approach.
>>
>> To avoid breaking uapi, adding a tracepoint in bpf_xdp_link_attach() is
>> an appropriate way to notify users the error message.
>>
>> Hence, bpf libraries are able to retrieve the error message by this
>> tracepoint, and then report the error message to users.
> 
> Whatevered-by: Jakub Kicinski <kuba@kernel.org> ?

Oh, it's not responsible for libraries to retrieve the error message. It
should be users' responsibility.

Sorry for the misguiding text.

In the previous patch[0], which changes uapi, it's able to back-propagate
the error message from dev_xdp_attach() to userspace through BPF syscall.
Then, tracepoint idea is suggested to avoid changing uapi. I do agree to
implement a tracepoint to avoid changing uapi.

[0] bpf: Introduce user log
https://lore.kernel.org/bpf/20230708040750.72570-1-hffilwlqm@gmail.com/

Thanks,
Leon

  reply	other threads:[~2023-08-02  6:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 14:26 [PATCH bpf-next v5 0/2] bpf, xdp: Add tracepoint to xdp attaching failure Leon Hwang
2023-08-01 14:26 ` [PATCH bpf-next v5 1/2] " Leon Hwang
2023-08-01 22:08   ` Jakub Kicinski
2023-08-02  6:51     ` Leon Hwang [this message]
2023-08-01 14:26 ` [PATCH bpf-next v5 2/2] selftests/bpf: Add testcase for xdp attaching failure tracepoint Leon Hwang
2023-08-02 21:40 ` [PATCH bpf-next v5 0/2] bpf, xdp: Add tracepoint to xdp attaching failure patchwork-bot+netdevbpf

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=1483f6db-35a8-849b-9bda-00ad5aa81eff@gmail.com \
    --to=hffilwlqm@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-patches-bot@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mhiramat@kernel.org \
    --cc=mykolal@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=tangyeechou@gmail.com \
    --cc=yonghong.song@linux.dev \
    /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).