syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:9c54130c Add linux-next specific files for 20210406
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=17d8d7aad0
> kernel config: https://syzkaller.appspot.com/x/.config
Cong Wang wrote:
> On Thu, Apr 8, 2021 at 5:26 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > The last refcnt of the psock can be gone right after
> > > sock_map_remove_links(), so sk_psock_sto
Lorenzo Bianconi wrote:
> This series introduce XDP multi-buffer support. The mvneta driver is
> the first to support these new "non-linear" xdp_{buff,frame}. Reviewers
> please focus on how these new types of xdp_{buff,frame} packets
> traverse the different layers and the layout design. It is on
eported-by: syzbot+7b6548ae483d6f4c6...@syzkaller.appspotmail.com
> Fixes: 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()")
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
> net/core/sock_map
> Reported-and-tested-by: syzbot+320a3bc8d80f478c3...@syzkaller.appspotmail.com
> Fixes: 8a59f9d1e3d4 ("sock: Introduce sk->sk_prot->psock_update_sk_prot()")
> Cc: John Fastabend
> Cc: Eric Dumazet
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Baue
Toke Høiland-Jørgensen wrote:
> John Fastabend writes:
>
> > Toke Høiland-Jørgensen wrote:
> >> John Fastabend writes:
> >>
> >> > Toke Høiland-Jørgensen wrote:
> >> >> Hangbin Liu writes:
> >> >>
> >> >&g
Toke Høiland-Jørgensen wrote:
> John Fastabend writes:
>
> > Toke Høiland-Jørgensen wrote:
> >> Hangbin Liu writes:
> >>
> >> > On Mon, Apr 05, 2021 at 05:24:48PM -0700, John Fastabend wrote:
> >> >> Hangbin Liu wrot
Toke Høiland-Jørgensen wrote:
> Hangbin Liu writes:
>
> > On Mon, Apr 05, 2021 at 05:24:48PM -0700, John Fastabend wrote:
> >> Hangbin Liu wrote:
> >> > This patch add two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to
> >> > extend
Cong Wang wrote:
> On Mon, Apr 5, 2021 at 1:25 AM Eric Dumazet wrote:
> >
> >
> >
> > On 3/31/21 4:32 AM, Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > Currently sockmap calls into each protocol to update the struct
> > > proto and replace it. This certainly won't work when the protocol
> >
syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:514e1150 net: x25: Queue received packets in the drivers i..
> git tree: net-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=112a8831d0
> kernel config: https://syzkaller.appspot.com/x/
Eric Dumazet wrote:
>
>
> On 3/31/21 4:32 AM, Cong Wang wrote:
> > From: Cong Wang
> >
> > Currently sockmap calls into each protocol to update the struct
> > proto and replace it. This certainly won't work when the protocol
> > is implemented as a module, for example, AF_UNIX.
> >
> > Introdu
Pedro Tammela wrote:
> This macro was refactored out of the bpf selftests.
>
> Since percpu values are rounded up to '8' in the kernel, a careless
> user in userspace might encounter unexpected values when parsing the
> output of the batched operations.
>
> Now that both array and hash maps have
Pedro Tammela wrote:
> Suggested-by: Jamal Hadi Salim
> Signed-off-by: Pedro Tammela
> ---
A commit message describing some of the change details and a note it uses
the for-each cpu copies (same as normal syscall on percpu map) and not the
per-cpu ones would be nice. I at least had to go and che
Hangbin Liu wrote:
> This patch add two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to extend
> xdp_redirect_map for broadcast support.
>
> Keep the general data path in net/core/filter.c and the native data
> path in kernel/bpf/devmap.c so we can use direct calls to get better
> performace.
>
Cong Wang wrote:
> From: Cong Wang
>
> These comments in udp_bpf_update_proto() are copied from the
> original TCP code and apparently do not apply to UDP. Just
> remove them.
>
> Reported-by: Jakub Sitnicki
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Loren
s memory will be claimed on psock_other.
Reported-by: Andrii Nakryiko
Fixes: 6fa9201a89898 ("bpf, sockmap: Avoid returning unneeded EAGAIN when
redirecting to self")
Signed-off-by: John Fastabend
---
net/core/skmsg.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
to the saved unhash() handler.
Fixes: 4da6a196f93b1 ("bpf: Sockmap/tls, during free we may call
tcp_bpf_unhash() in loop")
Reported-by: Cong Wang
Reported-by: Lorenz Bauer
Suggested-by: Cong Wang
Signed-off-by: John Fastabend
---
include/linux/skmsg.h |7 ++-
1 file changed, 6 insertion
with usual suspects: test_sockmap, test_maps, test_progs
and test_progs-no_alu32.
v2: drop skb_orphan its not necessary and use sk directly instead
of using psock->sk both suggested by Cong
---
John Fastabend (2):
bpf, sockmap: fix sk->prot unhash op reset
bpf, sockma
> skmsg.c and export them to modules.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
Acked-by: John Fastabend
Cong Wang wrote:
> From: Cong Wang
>
> We have thousands of services connected to a daemon on every host
> via AF_UNIX dgram sockets, after they are moved into VM, we have to
> add a proxy to forward these communications from VM to host, because
> rewriting thousands of them is not practical. Thi
Cong Wang wrote:
> From: Cong Wang
>
> We have to implement udp_bpf_recvmsg() to replace the ->recvmsg()
> to retrieve skmsg from ingress_msg.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
Acked-by: John Fastabend
Cong Wang wrote:
> From: Cong Wang
>
> Now UDP supports sockmap and redirection, we can safely update
> the sock type checks for it accordingly.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
&g
y(), and UDP still does not
> support splice() due to lack of ->splice_read(), so users
> can not reach udp_read_sock() directly.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Thanks t
skb_verdict. Users are not
> allowed to attach stream_verdict and skb_verdict programs to the
> same map.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Looks good.
Acked-by: John Fastabend
ock_map_link_no_progs() too.
>
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Cc: John Fastabend
> Signed-off-by: Cong Wang
> ---
Acked-by: John Fastabend
Cong Wang wrote:
> From: Cong Wang
>
> Currently we purge the ingress_skb queue only when psock
> refcnt goes down to 0, so locking the queue is not necessary,
> but in order to be called during ->close, we have to lock it
> here.
>
> Cc: John Fastabend
> Cc:
Cong Wang wrote:
> On Mon, Mar 29, 2021 at 11:23 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > On Mon, Mar 29, 2021 at 1:54 PM John Fastabend
> > > wrote:
> > > >
> > > > Cong Wang wrote:
> > > > > From: Cong
Cong Wang wrote:
> On Mon, Mar 29, 2021 at 1:54 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > This is similar to tcp_read_sock(), except we do not need
> > > to worry about connections, we
Cong Wang wrote:
> From: Cong Wang
>
> Now UDP supports sockmap and redirection, we can safely update
> the sock type checks for it accordingly.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
&g
Cong Wang wrote:
> From: Cong Wang
>
> This is similar to tcp_read_sock(), except we do not need
> to worry about connections, we just need to retrieve skb
> from UDP receive queue.
>
> Note, the return value of ->read_sock() is unused in
> sk_psock_verdict_data_ready
skb_verdict. Users are not
> allowed to set stream_verdict and skb_verdict at the same time.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
[...]
> diff --git a/net/core/skmsg.c b/net/core/skms
Cong Wang wrote:
> From: Cong Wang
>
> This function is only called in process context.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
> net/core/skmsg.c | 2 +-
> 1 file
Cong Wang wrote:
> From: Cong Wang
>
> The RCU callback sk_psock_destroy() only queues work psock->gc,
> so we can just switch to rcu work to simplify the code.
>
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Acked-by: John Fastabend
> Sign
gt; As noticed by John, we still have to lock the psock->work,
> because the same work item could be running concurrently on
> different CPU's.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Acked-by: John Fastabend
> it still has to use lock_sock.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Lorenz Bauer
> Acked-by: Jakub Sitnicki
> Signed-off-by: Cong Wang
> ---
Acked-by: John Fastabend
Alexei Starovoitov wrote:
> On Sun, Mar 28, 2021 at 01:20:00PM -0700, Cong Wang wrote:
> > From: Cong Wang
> >
> > We have thousands of services connected to a daemon on every host
> > via AF_UNIX dgram sockets, after they are moved into VM, we have to
> > add a proxy to forward these communicati
Cong Wang wrote:
> From: Cong Wang
>
> The RCU callback sk_psock_destroy() only queues work psock->gc,
> so we can just switch to rcu work to simplify the code.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-o
queues when psock refcnt reaches zero but
> here we want to purge them explicitly in sock_map_close().
> There are also some nasty race conditions on testing bit
> SK_PSOCK_TX_ENABLED and queuing/canceling the psock work,
> we can expand psock->ingress_lock a bit to protect them too.
>
&
Cong Wang wrote:
> On Wed, Mar 24, 2021 at 7:46 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > On Wed, Mar 24, 2021 at 2:00 PM John Fastabend
> > > wrote:
> > > >
> > > > Incorrect accounting fwd_alloc
Cong Wang wrote:
> On Wed, Mar 24, 2021 at 7:28 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > On Wed, Mar 24, 2021 at 1:59 PM John Fastabend
> > > wrote:
> > > > diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
> > > &g
Daniel Borkmann wrote:
> On 3/24/21 10:07 PM, John Fastabend wrote:
> > With a relatively recent clang master branch test_map skips a section,
> >
> > libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
> >
> > the cause is some pointless st
Cong Wang wrote:
> On Wed, Mar 24, 2021 at 2:00 PM John Fastabend
> wrote:
> >
> > Incorrect accounting fwd_alloc can result in a warning when the socket
> > is torn down,
> >
[...]
> > To resolve lets only account for sockets on the ingress queue that are
&
Cong Wang wrote:
> On Wed, Mar 24, 2021 at 1:59 PM John Fastabend
> wrote:
> > diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
> > index 47b7c5334c34..ecb5634b4c4a 100644
> > --- a/net/tls/tls_main.c
> > +++ b/net/tls/tls_main.c
> > @@ -754,6 +754,12 @
: John Fastabend
---
.../selftests/bpf/progs/sockmap_tcp_msg_prog.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
b/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
index fdb4bf4408fa..0f603253f4ed 100644
--- a/tools
Small fix to silence a warning running ./test_maps on my local test boxes.
Pushed to 'bpf' but can also apply against 'bpf-next' if folks would
prefer.
Thanks.
---
John Fastabend (1):
bpf, selftests: test_maps generating unrecognized data section
...
s memory will be claimed on psock_other.
Reported-by: Andrii Nakryiko
Fixes: 6fa9201a89898 ("bpf, sockmap: Avoid returning unneeded EAGAIN when
redirecting to self")
Signed-off-by: John Fastabend
---
net/core/skmsg.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
l point to the saved unhash()
handler.
Fixes: 4da6a196f93b1 ("bpf: Sockmap/tls, during free we may call
tcp_bpf_unhash() in loop")
Reported-by: Cong Wang
Reported-by: Lorenz Bauer
Signed-off-by: John Fastabend
---
include/linux/skmsg.h |1 -
net/tls/tls_main.c|6 +
test_progs
and test_progs-no_alu32.
---
John Fastabend (2):
bpf, sockmap: fix sk->prot unhash op reset
bpf, sockmap: fix incorrect fwd_alloc accounting
include/linux/skmsg.h |1 -
net/core/skmsg.c | 13 ++---
net/tls/tls_main.c|6 ++
3 file
queues when psock refcnt reaches zero but
> here we want to purge them explicitly in sock_map_close().
> There are also some nasty race conditions on testing bit
> SK_PSOCK_TX_ENABLED and queuing/canceling the psock work,
> we can expand psock->ingress_lock a bit to protect them too.
>
&
Cong Wang wrote:
> On Fri, Mar 5, 2021 at 5:55 PM John Fastabend
> wrote:
> >
[...]
> > > // tcp_bpf_prots->unhash == sock_map_unhash
> > > sk_psock_restore_proto();
> > > // Now tcp_bpf_prots->unhash is inet_unhash
> > > ...
>
Cong Wang wrote:
> On Fri, Mar 5, 2021 at 5:21 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > UDP already has udp_sendmsg() which takes lock_sock() inside.
> > > We have to build ->sendmsg_locked()
Cong Wang wrote:
> On Fri, Mar 5, 2021 at 4:27 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > On Tue, Mar 2, 2021 at 10:23 AM Cong Wang
> > > wrote:
> > > >
> > > > On Tue, Mar 2, 2021 at 8:22 AM Lorenz Bauer wrote
Cong Wang wrote:
> From: Cong Wang
>
> UDP already has udp_sendmsg() which takes lock_sock() inside.
> We have to build ->sendmsg_locked() on top of it, by adding
> a new parameter for whether the sock has been locked.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
, it is completely unrelated to my patch, as the current code has
> > the same problem.
>
> Looking at this again. I noticed
>
> commit 4da6a196f93b1af7612340e8c1ad8ce71e18f955
> Author: John Fastabend
> Date: Sat Jan 11 06:11:59 2020 +
>
> bpf: Sockmap/tls, duri
Cong Wang wrote:
> From: Cong Wang
>
> This should fix the following warning:
>
> include/linux/skbuff.h:932: warning: Function parameter or member
> '_sk_redir' not described in 'sk_buff'
>
> Reported-by: Lorenz Bauer
> Cc: Daniel Borkm
||
>
> Basically matches
>
> - CHECKSUM_NONE
> - CHECKSUM_UNNECESSARY which has already used up its valid state on a
> prior header
> - CHECKSUM_COMPLETE with bad checksum.
>
> This change just refines to not drop for in the first two cases on a
> zero checksum field.
+1
>
> Making this explicit in case anyone sees holes in the logic. Else,
>
> Acked-by: Willem de Bruijn
LGTM,
Acked-by: John Fastabend
47 1775988 1600203 1440054
> page1974058 1953655 1945463 1904478
> percent 3.0%10.0% 21.58% 32.3%
>
For the series, but might be good to get Dave or Jakub to check
2/6 to be sure they agree.
Acked-by: John Fastabend
Xuan Zhuo wrote:
> On Wed, 17 Feb 2021 16:46:04 -0800, John Fastabend
> wrote:
> > Alexander Lobakin wrote:
> > > From: Xuan Zhuo
> > >
> > > This patch is used to construct skb based on page to save memory copy
> > > overhead.
&
Alexander Lobakin wrote:
> From: Xuan Zhuo
>
> This patch is used to construct skb based on page to save memory copy
> overhead.
>
> This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the
> network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to
> directly construct
6ef59 ("bpf: Optimize program stats")
> Fixes: ca06f55b9002 ("bpf: Add per-program recursion prevention mechanism")
> Cc: Alexei Starovoitov
> Signed-off-by: Cong Wang
> ---
Acked-by: John Fastabend
esper Dangaard Brouer
> ---
LGTM.
Acked-by: John Fastabend
specify the L3 length that the MTU check
> + * is done against. Remeber XDP and TC length operate at L2, but
^^^
typo, Remember
Acked-by: John Fastabend
Cong Wang wrote:
> On Wed, Feb 17, 2021 at 10:40 AM John Fastabend
> wrote:
> > > @@ -802,9 +809,10 @@ int sk_psock_tls_strp_read(struct sk_psock *psock,
> > > struct sk_buff *skb)
> > >* TLS context.
> > >
2)
>
> Please let me know what your preference is.
Seems reasonable to me. For the series,
Acked-by: John Fastabend
Lorenz Bauer wrote:
> On Mon, 15 Feb 2021 at 19:20, John Fastabend wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly
> > > does not work for any other non-TCP prot
o longer needed after ->sk_data_ready() so we can just drop it.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Great, its likely we have more space in sk_buff we can use if needed
as well. queue_m
Maciej Fijalkowski wrote:
> On Tue, Feb 16, 2021 at 11:15:41AM -0800, John Fastabend wrote:
> > Toke Høiland-Jørgensen wrote:
> > > Björn Töpel writes:
> > >
> > > > On 2021-02-15 21:49, John Fastabend wrote:
> > > >> Maciej Fijalkowski wro
Toke Høiland-Jørgensen wrote:
> Björn Töpel writes:
>
> > On 2021-02-15 21:49, John Fastabend wrote:
> >> Maciej Fijalkowski wrote:
> >>> Currently, if there are multiple xdpsock instances running on a single
> >>> interface and in case one of the in
Maciej Fijalkowski wrote:
> On Mon, Feb 15, 2021 at 12:49:27PM -0800, John Fastabend wrote:
> > Maciej Fijalkowski wrote:
> > > Currently, if there are multiple xdpsock instances running on a single
> > > interface and in case one of the instances is terminated, the res
Cong Wang wrote:
> On Mon, Feb 15, 2021 at 4:54 PM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > On Mon, Feb 15, 2021 at 3:57 PM John Fastabend
> > > wrote:
> > > >
> > > > For TCP case we can continue to use CB and not pa
Cong Wang wrote:
> On Mon, Feb 15, 2021 at 3:57 PM John Fastabend
> wrote:
> >
> > For TCP case we can continue to use CB and not pay the price. For UDP
> > and AF_UNIX we can do the extra alloc.
>
> I see your point, but specializing TCP case does not give much
Toke Høiland-Jørgensen wrote:
> John Fastabend writes:
>
> >> > However, in libxdp we can solve the original problem in a different way,
> >> > and in fact I already suggested to Magnus that we should do this (see
> >> > [1]); so one way forward
Cong Wang wrote:
> On Mon, Feb 15, 2021 at 11:20 AM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly
> > > does not work for any other non-TC
Maciej Fijalkowski wrote:
> Currently, if there are multiple xdpsock instances running on a single
> interface and in case one of the instances is terminated, the rest of
> them are left in an inoperable state due to the fact of unloaded XDP
> prog from interface.
>
> To address that, step away fr
Maciej Fijalkowski wrote:
> xsk_lookup_bpf_maps, based on prog_fd, looks whether current prog has a
> reference to XSKMAP. BPF prog can include insns that work on various BPF
> maps and this is covered by iterating through map_ids.
>
> The bpf_map_info that is passed to bpf_obj_get_info_by_fd for
Maciej Fijalkowski wrote:
> With the introduction of bpf_link in xsk's libbpf part, there's no
> further need for explicit unload of prog on xdpsock's termination. When
> process dies, the bpf_link's refcount will be decremented and resources
> will be unloaded/freed under the hood in case when the
Björn Töpel wrote:
> On 2021-02-15 18:07, Toke Høiland-Jørgensen wrote:
> > Maciej Fijalkowski writes:
> >
> >> Currently, if there are multiple xdpsock instances running on a single
> >> interface and in case one of the instances is terminated, the rest of
> >> them are left in an inoperable sta
Cong Wang wrote:
> From: Cong Wang
>
> Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly
> does not work for any other non-TCP protocols. We can move them to
> skb ext instead of playing with skb cb, which is harder to make
> correct.
>
> Cc: John Fastaben
Cong Wang wrote:
> From: Cong Wang
>
> These two eBPF programs are tied to BPF_SK_SKB_STREAM_PARSER
> and BPF_SK_SKB_STREAM_VERDICT, rename them to reflect the fact
> they are only used for TCP. And save the name 'skb_verdict' for
> general use later.
>
>
imilar to skb_shinfo(skb) computation
> in bpf_convert_shinfo_access().
>
> Suggested-by: Jakub Sitnicki
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Acked-by: John Fastabend
Cong Wang wrote:
> From: Cong Wang
>
> struct sk_psock_parser is embedded in sk_psock, it is
> unnecessary as skb verdict also uses ->saved_data_ready.
> We can simply fold these fields into sk_psock, and get rid
> of ->enabled.
>
> Cc: John Fastabend
>
d leave CONFIG_NET_SOCK_MSG untouched, as it is used by
> non-sockmap cases.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
Thanks for doing this.
Acked-by: John Fastabend
Cong Wang wrote:
> On Mon, Feb 8, 2021 at 12:21 AM John Fastabend
> wrote:
> >
> > Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > Before we add non-TCP support, it is necessary to rename
> > > BPF_STREAM_PARSER as it will be no long
Jakub Sitnicki wrote:
> On Wed, Feb 03, 2021 at 05:16 AM CET, Cong Wang wrote:
> > From: Cong Wang
> >
> > struct sk_psock_parser is embedded in sk_psock, it is
> > unnecessary as skb verdict also uses ->saved_data_ready.
> > We can simply fold these fi
a new type of eBPF program, skb_verdict.
> Users are not allowed to set stream_verdict and skb_verdict at the
> same time.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
I think it will be better if we
Cong Wang wrote:
> From: Cong Wang
>
> These two ebpf programs are tied to BPF_SK_SKB_STREAM_PARSER
> and BPF_SK_SKB_STREAM_VERDICT, rename them to reflect the fact
> they are currently used for TCP. And save the generic name
> skb_verdict for general use.
>
> Cc: John
hat sock_map.c hopefully would be protocol-independent.
>
> Also, improve its Kconfig description to avoid confusion.
>
> Cc: John Fastabend
> Cc: Daniel Borkmann
> Cc: Jakub Sitnicki
> Cc: Lorenz Bauer
> Signed-off-by: Cong Wang
> ---
The BPF_STREAM_PARSER config was
Hangbin Liu wrote:
> Hi Daniel, Alexei,
>
> It has been one week after Maciej, Toke, John's review/ack. What should
> I do to make a progress for this patch set?
>
Patchwork is usually the first place to check:
https://patchwork.kernel.org/project/netdevbpf/list/?series=421095&state=*
Looks l
tools/lib/bpf/Makefile | 47
> 2 files changed, 4 insertions(+), 44 deletions(-)
I've also hit these annoying cases at least once or twice.
Acked-by: John Fastabend
Cong Wang wrote:
> On Wed, Feb 3, 2021 at 9:48 AM Alexei Starovoitov
> wrote:
> >
> > On Tue, Feb 02, 2021 at 08:16:17PM -0800, Cong Wang wrote:
> > > From: Cong Wang
> > >
> > > Currently sockmap only fully supports TCP, UDP is partially supported
> > > as it is only allowed to add into sockmap.
; ./test_progs -t cls_redirect
>
> Signed-off-by: Jesper Dangaard Brouer
> ---
Acked-by: John Fastabend
ce "up" (IFF_UP) check.
> - Adjustment to handle bpf_redirect_peer() helper
>
> Signed-off-by: Jesper Dangaard Brouer
> ---
LGTM.
Acked-by: John Fastabend
Jesper Dangaard Brouer wrote:
> This BPF-helper bpf_check_mtu() works for both XDP and TC-BPF programs.
>
> The SKB object is complex and the skb->len value (accessible from
> BPF-prog) also include the length of any extra GRO/GSO segments, but
> without taking into account that these GRO/GSO segm
t;
> V5:
> - Fixed uninit value spotted by Dan Carpenter.
> - Name struct output member mtu_result
>
> Reported-by: kernel test robot
> Reported-by: Dan Carpenter
> Signed-off-by: Jesper Dangaard Brouer
> ---
LGTM.
Acked-by: John Fastabend
se same method as XDP for 'tot_len' MTU check
>
> Fixes: 4c79579b44b1 ("bpf: Change bpf_fib_lookup to return lookup status")
> Reported-by: Carlo Carraro
> Signed-off-by: Jesper Dangaard Brouer
> ---
Acked-by: John Fastabend
if (data + nh_off > data_end)
> + return XDP_DROP;
> +
> + mac = bpf_map_lookup_elem(&mac_map, &key);
> + if (mac)
> + __builtin_memcpy(eth->h_source, mac, ETH_ALEN);
> +
> + return XDP_PASS;
> +}
Might be nice to a
Hangbin Liu wrote:
> On Wed, Jan 27, 2021 at 02:24:47PM -0800, John Fastabend wrote:
> > [...]
> >
> > > +{
> > > + "ARG_CONST_MAP_PTR_OR_NULL: null pointer for ex_map",
> > > + .insns = {
> > > + BPF_MOV64_IMM(BPF_REG_
Hangbin Liu wrote:
> Use helper bpf_redirect_map() and bpf_redirect_map_multi() to test bpf
> arg ARG_CONST_MAP_PTR and ARG_CONST_MAP_PTR_OR_NULL. Make sure the
> map arg could be verified correctly when it is NULL or valid map
> pointer.
>
> Add devmap and devmap_hash in struct bpf_test due to bp
he
> new helper to make a difference with bpf_xdp_redirect_map().
>
> Also I keep the general data path in net/core/filter.c, the native data
> path in kernel/bpf/devmap.c so we can use direct calls to get better
> performace.
>
> [0] https://xdp-project.net/#Handling-multicast
>
> Signed-off-by: Hangbin Liu
>
Thanks for the updates.
Acked-by: John Fastabend
rnel.org/bpf/20200715070001.2048207-1-liuhang...@gmail.com/
> ---
LGTM
Acked-by: John Fastabend
1 - 100 of 2039 matches
Mail list logo