[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230920232706.498747-1-john.fastabend@gmail.com>
Date: Wed, 20 Sep 2023 16:27:03 -0700
From: John Fastabend <john.fastabend@...il.com>
To: daniel@...earbox.net,
ast@...nel.org,
andrii@...nel.org,
jakub@...udflare.com
Cc: john.fastabend@...il.com,
bpf@...r.kernel.org,
netdev@...r.kernel.org
Subject: [PATCH bpf 0/3] bpf, sockmap complete fixes for avail bytes
With e5c6de5fa0258 ("bpf, sockmap: Incorrectly handling copied_seq") we
started fixing the available bytes accounting by moving copied_seq to
where the user actually reads the bytes.
However we missed handling MSG_PEEK correctly and we need to ensure
that we don't kfree_skb() a skb off the receive_queue when the
copied_seq number is not incremented by user reads for some time.
John Fastabend (3):
bpf: tcp_read_skb needs to pop skb regardless of seq
bpf: sockmap, do not inc copied_seq when PEEK flag set
bpf: sockmap, add tests for MSG_F_PEEK
net/ipv4/tcp.c | 3 +-
net/ipv4/tcp_bpf.c | 4 +-
.../selftests/bpf/prog_tests/sockmap_basic.c | 52 +++++++++++++++++++
3 files changed, 56 insertions(+), 3 deletions(-)
--
2.33.0
Powered by blists - more mailing lists