Displaying 4 results from an estimated 4 matches for "fwd_cnd".
Did you mean:
fwd_cnt
2019 Apr 05
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...+ * by the transmitter is less than VIRTIO_VSOCK_MAX_PKT_BUF_SIZE
> > + */
> > + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->last_fwd_cnt);
>
> Locking? These fields should be accessed under tx_lock.
>
Yes, we need a lock, but looking in the code, vvs->fwd_cnd is written
taking rx_lock (virtio_transport_dec_rx_pkt) and it is read with the
tx_lock (virtio_transport_inc_tx_pkt).
Maybe we should use another spin_lock shared between RX and TX for those
fields or use atomic variables.
What do you suggest?
Thanks,
Stefano
2019 Apr 05
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...+ * by the transmitter is less than VIRTIO_VSOCK_MAX_PKT_BUF_SIZE
> > + */
> > + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->last_fwd_cnt);
>
> Locking? These fields should be accessed under tx_lock.
>
Yes, we need a lock, but looking in the code, vvs->fwd_cnd is written
taking rx_lock (virtio_transport_dec_rx_pkt) and it is read with the
tx_lock (virtio_transport_inc_tx_pkt).
Maybe we should use another spin_lock shared between RX and TX for those
fields or use atomic variables.
What do you suggest?
Thanks,
Stefano
2019 Apr 08
0
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
...an VIRTIO_VSOCK_MAX_PKT_BUF_SIZE
> > > + */
> > > + free_space = vvs->buf_alloc - (vvs->fwd_cnt - vvs->last_fwd_cnt);
> >
> > Locking? These fields should be accessed under tx_lock.
> >
>
> Yes, we need a lock, but looking in the code, vvs->fwd_cnd is written
> taking rx_lock (virtio_transport_dec_rx_pkt) and it is read with the
> tx_lock (virtio_transport_inc_tx_pkt).
>
> Maybe we should use another spin_lock shared between RX and TX for those
> fields or use atomic variables.
>
> What do you suggest?
Or make vvs->...
2019 Apr 04
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
In order to reduce the number of credit update messages,
we send them only when the space available seen by the
transmitter is less than VIRTIO_VSOCK_MAX_PKT_BUF_SIZE.
Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
---
include/linux/virtio_vsock.h | 1 +
net/vmw_vsock/virtio_transport_common.c | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)