mbox series

[bpf,v2,0/6] sockmap fixes

Message ID 160522352433.135009.15329422887113794062.stgit@john-XPS-13-9370 (mailing list archive)
Headers show
Series sockmap fixes | expand

Message

John Fastabend Nov. 12, 2020, 11:26 p.m. UTC
This includes fixes for sockmap found after I started running skmsg and
verdict programs on systems that I use daily. To date with attached
series I've been running for multiple weeks without seeing any issues
on systems doing calls, mail, movies, etc.

Also I started running packetdrill and after this series last remaining
fix needed is to handle MSG_EOR correctly. This will come as a follow
up to this, but because we use sendpage to pass pages into TCP stack
we need to enable TCP side some.

v2: 
 - Added patch3 to use truesize in sk_rmem_schedule (Daniel)
 - cleaned up some small nits... goto and extra set of brackets (Daniel)

---

John Fastabend (6):
      bpf, sockmap: fix partial copy_page_to_iter so progress can still be made
      bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect
      bpf, sockmap: Use truesize with sk_rmem_schedule()
      bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self
      bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self
      bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list


 net/core/skmsg.c   | 84 +++++++++++++++++++++++++++++++++++++++-------
 net/ipv4/tcp_bpf.c |  3 +-
 2 files changed, 73 insertions(+), 14 deletions(-)

--
Signature

Comments

Jakub Sitnicki Nov. 16, 2020, 2:49 p.m. UTC | #1
On Fri, Nov 13, 2020 at 12:26 AM CET, John Fastabend wrote:
> This includes fixes for sockmap found after I started running skmsg and
> verdict programs on systems that I use daily. To date with attached
> series I've been running for multiple weeks without seeing any issues
> on systems doing calls, mail, movies, etc.
>
> Also I started running packetdrill and after this series last remaining
> fix needed is to handle MSG_EOR correctly. This will come as a follow
> up to this, but because we use sendpage to pass pages into TCP stack
> we need to enable TCP side some.
>
> v2:
>  - Added patch3 to use truesize in sk_rmem_schedule (Daniel)
>  - cleaned up some small nits... goto and extra set of brackets (Daniel)
>
> ---
>
> John Fastabend (6):
>       bpf, sockmap: fix partial copy_page_to_iter so progress can still be made
>       bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect
>       bpf, sockmap: Use truesize with sk_rmem_schedule()
>       bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self
>       bpf, sockmap: Handle memory acct if skb_verdict prog redirects to self
>       bpf, sockmap: Avoid failures from skb_to_sgvec when skb has frag_list


Patch 5 potentially can be simplified. Otherwise LGTM. For the series:

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