From: Jakub Kicinski <kuba@kernel.org>
To: Leon Hwang <hffilwlqm@gmail.com>
Cc: 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, bpf@vger.kernel.org,
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 v4 1/2] bpf, xdp: Add tracepoint to xdp attaching failure
Date: Mon, 31 Jul 2023 19:43:36 -0700 [thread overview]
Message-ID: <20230731194336.5b4bd065@kernel.org> (raw)
In-Reply-To: <20230730114951.74067-2-hffilwlqm@gmail.com>
On Sun, 30 Jul 2023 19:49:50 +0800 Leon Hwang wrote:
> @@ -9472,6 +9473,7 @@ int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
> struct bpf_link_primer link_primer;
> struct bpf_xdp_link *link;
> struct net_device *dev;
> + struct netlink_ext_ack extack;
This is not initialized. Also, while fixing that, move it up
to maintain the line order by decreasing line length.
> int err, fd;
>
> rtnl_lock();
> @@ -9497,12 +9499,13 @@ int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
> goto unlock;
> }
>
> - err = dev_xdp_attach_link(dev, NULL, link);
> + err = dev_xdp_attach_link(dev, &extack, link);
> rtnl_unlock();
>
> if (err) {
> link->dev = NULL;
> bpf_link_cleanup(&link_primer);
> + trace_bpf_xdp_link_attach_failed(extack._msg);
next prev parent reply other threads:[~2023-08-01 2:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-30 11:49 [PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure Leon Hwang
2023-07-30 11:49 ` [PATCH bpf-next v4 1/2] " Leon Hwang
2023-08-01 2:43 ` Jakub Kicinski [this message]
2023-08-01 3:47 ` Leon Hwang
2023-07-30 11:49 ` [PATCH bpf-next v4 2/2] selftests/bpf: Add testcase for xdp attaching failure tracepoint Leon Hwang
2023-07-30 13:49 ` [PATCH bpf-next v4 0/2] bpf, xdp: Add tracepoint to xdp attaching failure Manjusaka
2023-07-31 12:38 ` Leon Hwang
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=20230731194336.5b4bd065@kernel.org \
--to=kuba@kernel.org \
--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=hffilwlqm@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-patches-bot@fb.com \
--cc=kpsingh@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).