netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Yihao Han <hanyihao@vivo.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	kernel@vivo.com
Subject: Re: [PATCH v2] samples/bpf: xdpsock: fix swap.cocci warning
Date: Sat, 11 Dec 2021 19:07:48 +0100	[thread overview]
Message-ID: <87sfuzuia3.fsf@toke.dk> (raw)
In-Reply-To: <CAEf4Bza3a88pdhFEQdR-FnT_gBPqBh+KL-OP-1P3bVfXv=Gbaw@mail.gmail.com>

Andrii Nakryiko <andrii.nakryiko@gmail.com> writes:

> On Fri, Dec 10, 2021 at 6:26 AM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>>
>> Yihao Han <hanyihao@vivo.com> writes:
>>
>> > Fix following swap.cocci warning:
>> > ./samples/bpf/xdpsock_user.c:528:22-23:
>> > WARNING opportunity for swap()
>> >
>> > Signed-off-by: Yihao Han <hanyihao@vivo.com>
>>
>> Erm, did this get applied without anyone actually trying to compile
>> samples? I'm getting build errors as:
>
> Good news: I actually do build samples/bpf nowadays after fixing a
> bunch of compilation issues recently.

Awesome!

> Bad news: seems like I didn't pay too much attention after building
> samples/bpf for this particular patch, sorry about that. I've dropped
> this patch, samples/bpf builds for me. We should be good now.

Yup, looks good, thanks!

>>   CC  /home/build/linux/samples/bpf/xsk_fwd.o
>> /home/build/linux/samples/bpf/xsk_fwd.c: In function ‘swap_mac_addresses’:
>> /home/build/linux/samples/bpf/xsk_fwd.c:658:9: warning: implicit declaration of function ‘swap’; did you mean ‘swab’? [-Wimplicit-function-declaration]
>>   658 |         swap(*src_addr, *dst_addr);
>>       |         ^~~~
>>       |         swab
>>
>> /usr/bin/ld: /home/build/linux/samples/bpf/xsk_fwd.o: in function `thread_func':
>> xsk_fwd.c:(.text+0x440): undefined reference to `swap'
>> collect2: error: ld returned 1 exit status
>>
>>
>> Could we maybe get samples/bpf added to the BPF CI builds? :)
>
> Maybe we could, if someone dedicated their effort towards making this
> happen.

Is it documented anywhere what that would entail? Is it just a matter of
submitting a change to https://github.com/kernel-patches/vmtest ?

-Toke


  reply	other threads:[~2021-12-11 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  9:22 [PATCH v2] samples/bpf: xdpsock: fix swap.cocci warning Yihao Han
2021-12-09 20:11 ` John Fastabend
2021-12-10 14:26 ` Toke Høiland-Jørgensen
2021-12-10 23:53   ` Andrii Nakryiko
2021-12-11 18:07     ` Toke Høiland-Jørgensen [this message]
2021-12-12 19:46       ` Andrii Nakryiko
2021-12-13 12:09         ` Toke Høiland-Jørgensen

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=87sfuzuia3.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hanyihao@vivo.com \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kernel@vivo.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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).