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

2025-01-22 Thread Jiayuan Chen
On Tue, Jan 21, 2025 at 03:18:38PM +0100, Jakub Sitnicki wrote: > On Tue, Jan 21, 2025 at 01:07 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

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

2025-01-21 Thread Jakub Sitnicki
On Tue, Jan 21, 2025 at 01:07 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

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

2025-01-20 Thread Jiayuan Chen
'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 accuracy of the 'fionread' feature. It works for a single stream_v