netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wangyufen <wangyufen@huawei.com>
To: Saeed Mahameed <saeed@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	shuah@kernel.org, andrii@kernel.org, mykolal@fb.com,
	ast@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	"Daniel Müller" <deso@posteo.net>
Subject: Re: [PATCH v2 1/2] selftests/net: fix missing xdp_dummy
Date: Thu, 17 Nov 2022 10:00:27 +0800	[thread overview]
Message-ID: <e348e36b-2a8b-7c76-4b6f-ac07407597bb@huawei.com> (raw)
In-Reply-To: <Y3VcyRoZ3OQvv309@x130.lan>



在 2022/11/17 5:57, Saeed Mahameed 写道:
> On 15 Nov 18:23, Wang Yufen wrote:
>> After commit afef88e65554 ("selftests/bpf: Store BPF object files with
>> .bpf.o extension"), we should use xdp_dummy.bpf.o instade of xdp_dummy.o.
>>
>> In addition, use the BPF_FILE variable to save the BPF object file name,
>> which can be better identified and modified.
>>
>> Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with 
>> .bpf.o extension")
>> Signed-off-by: Wang Yufen <wangyufen@huawei.com>
>> Cc: Daniel Müller <deso@posteo.net>
>> ---
>> tools/testing/selftests/net/udpgro.sh         | 6 ++++--
>> tools/testing/selftests/net/udpgro_bench.sh   | 6 ++++--
>> tools/testing/selftests/net/udpgro_frglist.sh | 6 ++++--
>> tools/testing/selftests/net/udpgro_fwd.sh     | 3 ++-
>> tools/testing/selftests/net/veth.sh           | 9 +++++----
>> 5 files changed, 19 insertions(+), 11 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/udpgro.sh 
>> b/tools/testing/selftests/net/udpgro.sh
>> index 6a443ca..a66d62e 100755
>> --- a/tools/testing/selftests/net/udpgro.sh
>> +++ b/tools/testing/selftests/net/udpgro.sh
>> @@ -5,6 +5,8 @@
>>
>> readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)"
>>
>> +BPF_FILE="../bpf/xdp_dummy.bpf.o"
>> +
>> # set global exit status, but never reset nonzero one.
>> check_err()
>> {
>> @@ -34,7 +36,7 @@ cfg_veth() {
>>     ip -netns "${PEER_NS}" addr add dev veth1 192.168.1.1/24
>>     ip -netns "${PEER_NS}" addr add dev veth1 2001:db8::1/64 nodad
>>     ip -netns "${PEER_NS}" link set dev veth1 up
>> -    ip -n "${PEER_NS}" link set veth1 xdp object ../bpf/xdp_dummy.o 
>> section xdp
>> +    ip -n "${PEER_NS}" link set veth1 xdp object ${BPF_FILE} section xdp
>> }
>>
>> run_one() {
>> @@ -195,7 +197,7 @@ run_all() {
>>     return $ret
>> }
>>
>> -if [ ! -f ../bpf/xdp_dummy.o ]; then
>> +if [ ! -f ${BPF_FILE} ]; then
>>     echo "Missing xdp_dummy helper. Build bpf selftest first"
> 
> nit: I would improve the error message here to print  ${BPF_FILE}.
> There are 3 more spots in the rest of this patch.
got it, thanks!

  reply	other threads:[~2022-11-17  2:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 10:23 [PATCH v2 0/2] some fixes for selftest/net Wang Yufen
2022-11-15 10:23 ` [PATCH v2 1/2] selftests/net: fix missing xdp_dummy Wang Yufen
2022-11-16 21:57   ` Saeed Mahameed
2022-11-17  2:00     ` wangyufen [this message]
2022-11-15 10:23 ` [PATCH v2 2/2] selftests/net: fix opening object file failed Wang Yufen
2022-11-16 22:08   ` Saeed Mahameed
2022-11-17  1:59     ` wangyufen
2022-11-18 18:57   ` Martin KaFai Lau

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=e348e36b-2a8b-7c76-4b6f-ac07407597bb@huawei.com \
    --to=wangyufen@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=deso@posteo.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeed@kernel.org \
    --cc=shuah@kernel.org \
    /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).