diff options
author | Michal Luczaj <[email protected]> | 2024-10-13 18:26:40 +0200 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2024-10-17 13:02:54 +0200 |
commit | 3543152f2d330141d9394d28855cb90b860091d2 (patch) | |
tree | 22d8a715b06c49f14985b2025b9d1bc8a8525014 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 9c5bd93edf7b8834aecaa7c340b852d5990d7c78 (diff) |
vsock: Update rx_bytes on read_skb()
Make sure virtio_transport_inc_rx_pkt() and virtio_transport_dec_rx_pkt()
calls are balanced (i.e. virtio_vsock_sock::rx_bytes doesn't lie) after
vsock_transport::read_skb().
While here, also inform the peer that we've freed up space and it has more
credit.
Failing to update rx_bytes after packet is dequeued leads to a warning on
SOCK_STREAM recv():
[ 233.396654] rx_queue is empty, but rx_bytes is non-zero
[ 233.396702] WARNING: CPU: 11 PID: 40601 at net/vmw_vsock/virtio_transport_common.c:589
Fixes: 634f1a7110b4 ("vsock: support sockmap")
Suggested-by: Stefano Garzarella <[email protected]>
Signed-off-by: Michal Luczaj <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions