Re: [PATCH bpf v9 4/5] selftests/bpf: fix invalid flag of recv()

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > SOCK_NONBLOCK flag is only effective during socket creation, not during > recv. Use MSG_DONTWAIT instead. > > Signed-off-by: Jiayuan Chen > --- Acked-by: Jakub Sitnicki

Re: [PATCH bpf v9 0/5] bpf: fix wrong copied_seq calculation and add tests

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > A previous commit described in this topic > http://lore.kernel.org/bpf/20230523025618.113937-9-john.fastab...@gmail.com > directly updated 'sk->copied_seq' in the tcp_eat_skb() function when the > action of a BPF program was SK_REDIRECT. F

Re: [PATCH bpf v9 5/5] selftests/bpf: add strparser test for bpf

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > Add test cases for bpf + strparser and separated them from > sockmap_basic, as strparser has more encapsulation and parsing > capabilities compared to standard sockmap. > > Signed-off-by: Jiayuan Chen > --- Acked-by: Jakub Sitnicki

Re: [PATCH bpf v9 3/5] bpf: disable non stream socket for strparser

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > Currently, only TCP supports strparser, but sockmap doesn't intercept > non-TCP connections to attach strparser. For example, with UDP, although > the read/write handlers are replaced, strparser is not executed due to > the lack of a read_

Re: [PATCH bpf v9 2/5] bpf: fix wrong copied_seq calculation

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > 'sk->copied_seq' was updated in the tcp_eat_skb() function when the action > of a BPF program was SK_REDIRECT. For other actions, like SK_PASS, the > update logic for 'sk->copied_seq' was moved to tcp_bpf_recvmsg_parser() > to ensure the a

Re: [PATCH bpf v9 1/5] strparser: add read_sock callback

2025-01-26 Thread Jakub Sitnicki
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote: > Added a new read_sock handler, allowing users to customize read operations > instead of relying on the native socket's read_sock. > > Signed-off-by: Jiayuan Chen > --- Reviewed-by: Jakub Sitnicki