BPF List
 help / color / mirror / Atom feed
From: Jakub Sitnicki <jakub@cloudflare.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org,
	bpf@vger.kernel.org, netdev@vger.kernel.org, edumazet@google.com
Subject: Re: [PATCH bpf v3 0/3] bpf, sockmap complete fixes for avail bytes
Date: Fri, 29 Sep 2023 10:02:55 +0200	[thread overview]
Message-ID: <87fs2xflrw.fsf@cloudflare.com> (raw)
In-Reply-To: <20230926035300.135096-1-john.fastabend@gmail.com>

On Mon, Sep 25, 2023 at 08:52 PM -07, John Fastabend wrote:
> 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.
>
> v2: drop seq var in tcp_read_skb its no longer necessary per Jakub's
>     suggestion

Credit goes to Simon Horman.

> v3: drop tcp_sock as well its also not used anymore. sorry for the extra
>     noise there.
>
> 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                                | 10 +---
>  net/ipv4/tcp_bpf.c                            |  4 +-
>  .../selftests/bpf/prog_tests/sockmap_basic.c  | 52 +++++++++++++++++++
>  3 files changed, 57 insertions(+), 9 deletions(-)

For the series:

Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>

  parent reply	other threads:[~2023-09-29  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26  3:52 [PATCH bpf v3 0/3] bpf, sockmap complete fixes for avail bytes John Fastabend
2023-09-26  3:52 ` [PATCH bpf v3 1/3] bpf: tcp_read_skb needs to pop skb regardless of seq John Fastabend
2023-09-26  3:52 ` [PATCH bpf v3 2/3] bpf: sockmap, do not inc copied_seq when PEEK flag set John Fastabend
2023-09-26  3:53 ` [PATCH bpf v3 3/3] bpf: sockmap, add tests for MSG_F_PEEK John Fastabend
2023-09-29  8:02 ` Jakub Sitnicki [this message]
2023-09-29 15:10 ` [PATCH bpf v3 0/3] bpf, sockmap complete fixes for avail bytes patchwork-bot+netdevbpf

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=87fs2xflrw.fsf@cloudflare.com \
    --to=jakub@cloudflare.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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