mbox series

[bpf,v2,0/4] bpf, vsock: Fixes related to sockmap/sockhash redirection

Message ID 20241013-vsock-fixes-for-redir-v2-0-d6577bbfe742@rbox.co (mailing list archive)
Headers show
Series bpf, vsock: Fixes related to sockmap/sockhash redirection | expand

Message

Michal Luczaj Oct. 13, 2024, 4:26 p.m. UTC
Series consists of few fixes for issues uncovered while working on a BPF
sockmap/sockhash redirection selftest.

The last patch is more of a RFC clean up attempt. Patch claims that there's
no functional change, but effectively it removes (never touched?) reference
to sock_map_unhash().

Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
Changes in v2:
- Patch 2/4: Send a credit update [Stefano]
- Collect Reviewed-by
- Link to v1: https://lore.kernel.org/r/20241009-vsock-fixes-for-redir-v1-0-e455416f6d78@rbox.co

---
Michal Luczaj (4):
      bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock
      vsock: Update rx_bytes on read_skb()
      vsock: Update msg_count on read_skb()
      bpf, vsock: Drop static vsock_bpf_prot initialization

 include/net/sock.h                      |  5 +++++
 net/core/sock_map.c                     |  8 ++++++++
 net/vmw_vsock/virtio_transport_common.c | 14 ++++++++++++--
 net/vmw_vsock/vsock_bpf.c               |  8 --------
 4 files changed, 25 insertions(+), 10 deletions(-)
---
base-commit: afeb2b51a761c9c52be5639eb40460462083f222
change-id: 20241009-vsock-fixes-for-redir-86707e1e8c04

Best regards,

Comments

Stefano Garzarella Oct. 15, 2024, 8:31 a.m. UTC | #1
On Sun, Oct 13, 2024 at 06:26:38PM +0200, Michal Luczaj wrote:
>Series consists of few fixes for issues uncovered while working on a BPF
>sockmap/sockhash redirection selftest.
>
>The last patch is more of a RFC clean up attempt. Patch claims that there's
>no functional change, but effectively it removes (never touched?) reference
>to sock_map_unhash().
>
>Signed-off-by: Michal Luczaj <mhal@rbox.co>
>---
>Changes in v2:
>- Patch 2/4: Send a credit update [Stefano]
>- Collect Reviewed-by
>- Link to v1: https://lore.kernel.org/r/20241009-vsock-fixes-for-redir-v1-0-e455416f6d78@rbox.co

For the virtio-vsock point of view, the series LGTM and I reviewed patch 
2 and 3. I don't know BPF enough for the rest but I can't see anything 
wrong.

Thanks,
Stefano

>
>---
>Michal Luczaj (4):
>      bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock
>      vsock: Update rx_bytes on read_skb()
>      vsock: Update msg_count on read_skb()
>      bpf, vsock: Drop static vsock_bpf_prot initialization
>
> include/net/sock.h                      |  5 +++++
> net/core/sock_map.c                     |  8 ++++++++
> net/vmw_vsock/virtio_transport_common.c | 14 ++++++++++++--
> net/vmw_vsock/vsock_bpf.c               |  8 --------
> 4 files changed, 25 insertions(+), 10 deletions(-)
>---
>base-commit: afeb2b51a761c9c52be5639eb40460462083f222
>change-id: 20241009-vsock-fixes-for-redir-86707e1e8c04
>
>Best regards,
>-- 
>Michal Luczaj <mhal@rbox.co>
>
John Fastabend Oct. 16, 2024, 6:25 p.m. UTC | #2
Michal Luczaj wrote:
> Series consists of few fixes for issues uncovered while working on a BPF
> sockmap/sockhash redirection selftest.
> 
> The last patch is more of a RFC clean up attempt. Patch claims that there's
> no functional change, but effectively it removes (never touched?) reference
> to sock_map_unhash().
> 
> Signed-off-by: Michal Luczaj <mhal@rbox.co>
> ---

For the series LGTM, ack.

Acked-by: John Fastabend <john.fastabend@gmail.com>
patchwork-bot+netdevbpf@kernel.org Oct. 17, 2024, 11:10 a.m. UTC | #3
Hello:

This series was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Sun, 13 Oct 2024 18:26:38 +0200 you wrote:
> Series consists of few fixes for issues uncovered while working on a BPF
> sockmap/sockhash redirection selftest.
> 
> The last patch is more of a RFC clean up attempt. Patch claims that there's
> no functional change, but effectively it removes (never touched?) reference
> to sock_map_unhash().
> 
> [...]

Here is the summary with links:
  - [bpf,v2,1/4] bpf, sockmap: SK_DROP on attempted redirects of unsupported af_vsock
    https://git.kernel.org/bpf/bpf/c/9c5bd93edf7b
  - [bpf,v2,2/4] vsock: Update rx_bytes on read_skb()
    https://git.kernel.org/bpf/bpf/c/3543152f2d33
  - [bpf,v2,3/4] vsock: Update msg_count on read_skb()
    https://git.kernel.org/bpf/bpf/c/6dafde852df8
  - [bpf,v2,4/4] bpf, vsock: Drop static vsock_bpf_prot initialization
    https://git.kernel.org/bpf/bpf/c/19039f279797

You are awesome, thank you!