diff options
author | Arseniy Krasnov <avkrasnov@sberdevices.ru> | 2023-03-14 14:05:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-03-16 17:28:23 +0000 |
commit | 077706165717686a2a6a71405fef036cd5b37ae0 (patch) | |
tree | e877146d0f13096ecd9add1214769c816d18bdec /io_uring/sync.h | |
parent | cd356010ce4c69ac7e1a40586112df24d22c6a4b (diff) | |
download | linux-stable-077706165717686a2a6a71405fef036cd5b37ae0.tar.gz linux-stable-077706165717686a2a6a71405fef036cd5b37ae0.tar.bz2 linux-stable-077706165717686a2a6a71405fef036cd5b37ae0.zip |
virtio/vsock: don't use skbuff state to account credit
'skb->len' can vary when we partially read the data, this complicates the
calculation of credit to be updated in 'virtio_transport_inc_rx_pkt()/
virtio_transport_dec_rx_pkt()'.
Also in 'virtio_transport_dec_rx_pkt()' we were miscalculating the
credit since 'skb->len' was redundant.
For these reasons, let's replace the use of skbuff state to calculate new
'rx_bytes'/'fwd_cnt' values with explicit value as input argument. This
makes code more simple, because it is not needed to change skbuff state
before each call to update 'rx_bytes'/'fwd_cnt'.
Fixes: 71dc9ec9ac7d ("virtio/vsock: replace virtio_vsock_pkt with sk_buff")
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'io_uring/sync.h')
0 files changed, 0 insertions, 0 deletions