From: John Fastabend <john.fastabend@gmail•com>
To: Eric Dumazet <eric.dumazet@gmail•com>,
David Miller <davem@davemloft•net>
Cc: daniel@iogearbox•net, ast@fb•com, tgraf@suug•ch,
netdev@vger•kernel.org, tom@herbertland•com
Subject: Re: [net-next PATCH 00/10] BPF: sockmap and sk redirect support
Date: Wed, 16 Aug 2017 12:34:44 -0700 [thread overview]
Message-ID: <59949E54.8050202@gmail.com> (raw)
In-Reply-To: <1502911033.4936.144.camel@edumazet-glaptop3.roam.corp.google.com>
On 08/16/2017 12:17 PM, Eric Dumazet wrote:
> On Wed, 2017-08-16 at 12:13 -0700, David Miller wrote:
>> From: John Fastabend <john.fastabend@gmail•com>
>> Date: Wed, 16 Aug 2017 12:06:36 -0700
>>
>>> On 08/16/2017 11:35 AM, David Miller wrote:
>>>> From: David Miller <davem@davemloft•net>
>>>> Date: Wed, 16 Aug 2017 11:28:19 -0700 (PDT)
>>>>
>>>>> From: John Fastabend <john.fastabend@gmail•com>
>>>>> Date: Tue, 15 Aug 2017 22:30:15 -0700
>>>>>
>>>>>> This series implements a sockmap and socket redirect helper for BPF
>>>>>> using a model similar to XDP netdev redirect.
>>>>>
>>>>> Series applied, thanks John.
>>>>>
>>>>
>>>> We get a legit warning from gcc due to these changes:
>>>>
>>>> kernel/bpf/sockmap.c: In function ‘smap_state_change’:
>>>> kernel/bpf/sockmap.c:156:21: warning: ‘psock’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>> struct smap_psock *psock;
>>>>
>>>> It's the default switch case in this function, psock is not initialized
>>>> for sure at this point.
>>>>
>>>
>>> I missed this with older gcc4 it seems. Fixed now and compiling without errors
>>> now with gcc4/5. Below is the diff and all verifier/sockmap tests pass. Want a
>>> v2 I presume?
>>
>> I already pushed out v1, so you'll need to send me a fixup patch.
>
> I also have a build error.
>
> $ git grep -n __sock_map_lookup_elem
> include/linux/bpf.h:316:struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key);
> kernel/bpf/sockmap.c:558:struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key)
> net/core/filter.c:1881: sk = __sock_map_lookup_elem(ri->map, ri->ifindex);
>
>
>
> $ make ...
> ...
> net/core/filter.c: In function ‘do_sk_redirect_map’:
> net/core/filter.c:1881:3: error: implicit declaration of function ‘__sock_map_lookup_elem’ [-Werror=implicit-function-declaration]
> sk = __sock_map_lookup_elem(ri->map, ri->ifindex);
> ^
> net/core/filter.c:1881:6: warning: assignment makes pointer from integer without a cast [enabled by default]
> sk = __sock_map_lookup_elem(ri->map, ri->ifindex);
> ^
> cc1: some warnings being treated as errors
> make[2]: *** [net/core/filter.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
>
>
Thanks Eric, I'll have a fix shortly.
next prev parent reply other threads:[~2017-08-16 19:34 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 5:30 [net-next PATCH 00/10] BPF: sockmap and sk redirect support John Fastabend
2017-08-16 5:30 ` [net-next PATCH 01/10] net: early init support for strparser John Fastabend
2017-08-16 5:31 ` [net-next PATCH 02/10] net: add sendmsg_locked and sendpage_locked to af_inet6 John Fastabend
2017-08-16 5:31 ` [net-next PATCH 03/10] net: fixes for skb_send_sock John Fastabend
2017-08-16 5:31 ` [net-next PATCH 04/10] bpf: introduce new program type for skbs on sockets John Fastabend
2017-08-16 5:32 ` [net-next PATCH 05/10] bpf: export bpf_prog_inc_not_zero John Fastabend
2017-08-16 5:32 ` [net-next PATCH 06/10] bpf: sockmap with sk redirect support John Fastabend
2017-08-17 5:40 ` Alexei Starovoitov
2017-08-17 18:58 ` John Fastabend
2017-08-17 22:28 ` Alexei Starovoitov
2017-08-18 7:35 ` John Fastabend
2017-08-18 18:32 ` Alexei Starovoitov
2017-08-19 3:30 ` John Fastabend
2017-08-19 4:50 ` Alexei Starovoitov
2017-08-19 20:52 ` John Fastabend
2017-08-16 5:33 ` [net-next PATCH 07/10] bpf: add access to sock fields and pkt data from sk_skb programs John Fastabend
2017-08-17 5:42 ` Alexei Starovoitov
2017-08-17 12:40 ` Daniel Borkmann
2017-08-16 5:33 ` [net-next PATCH 08/10] bpf: sockmap sample program John Fastabend
2017-08-16 5:33 ` [net-next PATCH 09/10] bpf: selftests: add tests for new __sk_buff members John Fastabend
2017-08-16 5:34 ` [net-next PATCH 10/10] bpf: selftests add sockmap tests John Fastabend
2017-08-16 15:25 ` [net-next PATCH 00/10] BPF: sockmap and sk redirect support Daniel Borkmann
2017-08-16 18:28 ` David Miller
2017-08-16 18:35 ` David Miller
2017-08-16 19:06 ` John Fastabend
2017-08-16 19:13 ` David Miller
2017-08-16 19:17 ` Eric Dumazet
2017-08-16 19:34 ` John Fastabend [this message]
2017-08-16 21:22 ` David Miller
2017-08-16 21:35 ` David Ahern
2017-08-16 21:37 ` John Fastabend
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=59949E54.8050202@gmail.com \
--to=john.fastabend@gmail$(echo .)com \
--cc=ast@fb$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=tgraf@suug$(echo .)ch \
--cc=tom@herbertland$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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