Displaying 20 results from an estimated 58 matches for "peer_fwd_cnt".
2019 Oct 11
4
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...> > user space [exposed to the other peer] */
> > tx_cnt /* increased when TX packet is sent to the other peer */
> >
> > /* remote vars */
> > peer_buf_alloc /* peer's buf_alloc */
> > peer_fwd_cnt /* peer's fwd_cnt */
> >
> > When a peer sends a packet, it increases the 'tx_cnt'; when the
> > receiver consumes the packet (copy it to the user-space buffer), it
> > increases the 'fwd_cnt'.
> > Note: increments are made consi...
2019 Oct 11
4
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...> > user space [exposed to the other peer] */
> > tx_cnt /* increased when TX packet is sent to the other peer */
> >
> > /* remote vars */
> > peer_buf_alloc /* peer's buf_alloc */
> > peer_fwd_cnt /* peer's fwd_cnt */
> >
> > When a peer sends a packet, it increases the 'tx_cnt'; when the
> > receiver consumes the packet (copy it to the user-space buffer), it
> > increases the 'fwd_cnt'.
> > Note: increments are made consi...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...gt; + u64 buf_size;
> + u64 buf_size_min;
> + u64 buf_size_max;
> +
> + struct mutex tx_lock;
> + struct mutex rx_lock;
> +
> + struct list_head rx_queue;
> + u64 rx_bytes;
> +
> + /* Protected by trans->tx_lock */
> + u64 tx_cnt;
> + u64 buf_alloc;
> + u64 peer_fwd_cnt;
> + u64 peer_buf_alloc;
> + /* Protected by trans->rx_lock */
> + u64 fwd_cnt;
> +};
> +
> +struct virtio_vsock_pkt {
> + struct virtio_vsock_hdr hdr;
> + struct virtio_transport *trans;
> + struct work_struct work;
> + struct list_head list;
> + void *buf;
>...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...gt; + u64 buf_size;
> + u64 buf_size_min;
> + u64 buf_size_max;
> +
> + struct mutex tx_lock;
> + struct mutex rx_lock;
> +
> + struct list_head rx_queue;
> + u64 rx_bytes;
> +
> + /* Protected by trans->tx_lock */
> + u64 tx_cnt;
> + u64 buf_alloc;
> + u64 peer_fwd_cnt;
> + u64 peer_buf_alloc;
> + /* Protected by trans->rx_lock */
> + u64 fwd_cnt;
> +};
> +
> +struct virtio_vsock_pkt {
> + struct virtio_vsock_hdr hdr;
> + struct virtio_transport *trans;
> + struct work_struct work;
> + struct list_head list;
> + void *buf;
>...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...gt; + u32 buf_size;
> + u32 buf_size_min;
> + u32 buf_size_max;
> +
> + struct mutex tx_lock;
> + struct mutex rx_lock;
> +
> + struct list_head rx_queue;
> + u32 rx_bytes;
> +
> + /* Protected by trans->tx_lock */
> + u32 tx_cnt;
> + u32 buf_alloc;
> + u32 peer_fwd_cnt;
> + u32 peer_buf_alloc;
> + /* Protected by trans->rx_lock */
> + u32 fwd_cnt;
> +};
> +
> +struct virtio_vsock_pkt {
> + struct virtio_vsock_hdr hdr;
> + struct virtio_transport *trans;
> + struct work_struct work;
> + struct list_head list;
> + void *buf;
>...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...gt; + u32 buf_size;
> + u32 buf_size_min;
> + u32 buf_size_max;
> +
> + struct mutex tx_lock;
> + struct mutex rx_lock;
> +
> + struct list_head rx_queue;
> + u32 rx_bytes;
> +
> + /* Protected by trans->tx_lock */
> + u32 tx_cnt;
> + u32 buf_alloc;
> + u32 peer_fwd_cnt;
> + u32 peer_buf_alloc;
> + /* Protected by trans->rx_lock */
> + u32 fwd_cnt;
> +};
> +
> +struct virtio_vsock_pkt {
> + struct virtio_vsock_hdr hdr;
> + struct virtio_transport *trans;
> + struct work_struct work;
> + struct list_head list;
> + void *buf;
>...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...+ struct virtio_transport_pkt_ops *ops;
+ struct vsock_sock *vsk;
+
+ u64 buf_size;
+ u64 buf_size_min;
+ u64 buf_size_max;
+
+ struct mutex tx_lock;
+ struct mutex rx_lock;
+
+ struct list_head rx_queue;
+ u64 rx_bytes;
+
+ /* Protected by trans->tx_lock */
+ u64 tx_cnt;
+ u64 buf_alloc;
+ u64 peer_fwd_cnt;
+ u64 peer_buf_alloc;
+ /* Protected by trans->rx_lock */
+ u64 fwd_cnt;
+};
+
+struct virtio_vsock_pkt {
+ struct virtio_vsock_hdr hdr;
+ struct virtio_transport *trans;
+ struct work_struct work;
+ struct list_head list;
+ void *buf;
+ u32 len;
+ u32 off;
+};
+
+struct virtio_vsock_pkt_info {...
2019 Jul 17
1
[PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()
...b/include/linux/virtio_vsock.h
> index 49fc9d20bc43..4c7781f4b29b 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -35,7 +35,6 @@ struct virtio_vsock_sock {
>
> /* Protected by tx_lock */
> u32 tx_cnt;
> - u32 buf_alloc;
> u32 peer_fwd_cnt;
> u32 peer_buf_alloc;
>
> @@ -43,6 +42,7 @@ struct virtio_vsock_sock {
> u32 fwd_cnt;
> u32 last_fwd_cnt;
> u32 rx_bytes;
> + u32 buf_alloc;
> struct list_head rx_queue;
> };
>
> diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/vi...
2014 Jul 05
0
[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko
...+ struct virtio_transport_pkt_ops *ops;
+ struct vsock_sock *vsk;
+
+ u32 buf_size;
+ u32 buf_size_min;
+ u32 buf_size_max;
+
+ struct mutex tx_lock;
+ struct mutex rx_lock;
+
+ struct list_head rx_queue;
+ u32 rx_bytes;
+
+ /* Protected by trans->tx_lock */
+ u32 tx_cnt;
+ u32 buf_alloc;
+ u32 peer_fwd_cnt;
+ u32 peer_buf_alloc;
+ /* Protected by trans->rx_lock */
+ u32 fwd_cnt;
+
+ u16 dgram_id;
+};
+
+struct virtio_vsock_pkt {
+ struct virtio_vsock_hdr hdr;
+ struct virtio_transport *trans;
+ struct work_struct work;
+ struct list_head list;
+ void *buf;
+ u32 len;
+ u32 off;
+};
+
+struct virti...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...+ struct virtio_transport_pkt_ops *ops;
+ struct vsock_sock *vsk;
+
+ u32 buf_size;
+ u32 buf_size_min;
+ u32 buf_size_max;
+
+ struct mutex tx_lock;
+ struct mutex rx_lock;
+
+ struct list_head rx_queue;
+ u32 rx_bytes;
+
+ /* Protected by trans->tx_lock */
+ u32 tx_cnt;
+ u32 buf_alloc;
+ u32 peer_fwd_cnt;
+ u32 peer_buf_alloc;
+ /* Protected by trans->rx_lock */
+ u32 fwd_cnt;
+};
+
+struct virtio_vsock_pkt {
+ struct virtio_vsock_hdr hdr;
+ struct virtio_transport *trans;
+ struct work_struct work;
+ struct list_head list;
+ void *buf;
+ u32 len;
+ u32 off;
+};
+
+struct virtio_vsock_pkt_info {...
2019 Sep 01
0
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...d when RX packet is consumed by the
> user space [exposed to the other peer] */
> tx_cnt /* increased when TX packet is sent to the other peer */
>
> /* remote vars */
> peer_buf_alloc /* peer's buf_alloc */
> peer_fwd_cnt /* peer's fwd_cnt */
>
> When a peer sends a packet, it increases the 'tx_cnt'; when the
> receiver consumes the packet (copy it to the user-space buffer), it
> increases the 'fwd_cnt'.
> Note: increments are made considering the payload lengt...
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
...OCK_OP_NEGOTIATE to client
3) Client sends VIRTIO_VSOCK_OP_OFFER to server
4) Server responses with VIRTIO_VSOCK_OP_ATTACH to client
Virtio VM socket credit update:
Virtio VM socket uses credit-based flow control. The sender maintains tx_cnt
which counts the totoal number of bytes it has sent out, peer_fwd_cnt which
counts the totoal number of byes the receiver has forwarded, and peer_buf_alloc
which is the size of the receiver's receive buffer. The sender can send no more
than the credit the receiver gives to the sender: credit = peer_buf_alloc -
(tx_cnt - peer_fwd_cnt). The receiver can send VIRTIO...
2013 Jun 27
13
[RFC 0/5] Introduce VM Sockets virtio transport
...OCK_OP_NEGOTIATE to client
3) Client sends VIRTIO_VSOCK_OP_OFFER to server
4) Server responses with VIRTIO_VSOCK_OP_ATTACH to client
Virtio VM socket credit update:
Virtio VM socket uses credit-based flow control. The sender maintains tx_cnt
which counts the totoal number of bytes it has sent out, peer_fwd_cnt which
counts the totoal number of byes the receiver has forwarded, and peer_buf_alloc
which is the size of the receiver's receive buffer. The sender can send no more
than the credit the receiver gives to the sender: credit = peer_buf_alloc -
(tx_cnt - peer_fwd_cnt). The receiver can send VIRTIO...
2019 Sep 02
1
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...y the
> > user space [exposed to the other peer] */
> > tx_cnt /* increased when TX packet is sent to the other peer */
> >
> > /* remote vars */
> > peer_buf_alloc /* peer's buf_alloc */
> > peer_fwd_cnt /* peer's fwd_cnt */
> >
> > When a peer sends a packet, it increases the 'tx_cnt'; when the
> > receiver consumes the packet (copy it to the user-space buffer), it
> > increases the 'fwd_cnt'.
> > Note: increments are made cons...
2019 Jul 29
2
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...(increased when the
packets are sent) and the remote counter to calculate the credit available:
u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 credit)
{
u32 ret;
spin_lock_bh(&vvs->tx_lock);
ret = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt);
if (ret > credit)
ret = credit;
vvs->tx_cnt += ret;
spin_unlock_bh(&vvs->tx_lock);
return ret;
}
Maybe I can play with "buf_alloc" to take care of bytes queued but not
used.
Thanks,
Stefano
2019 Jul 29
2
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...(increased when the
packets are sent) and the remote counter to calculate the credit available:
u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 credit)
{
u32 ret;
spin_lock_bh(&vvs->tx_lock);
ret = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt);
if (ret > credit)
ret = credit;
vvs->tx_cnt += ret;
spin_unlock_bh(&vvs->tx_lock);
return ret;
}
Maybe I can play with "buf_alloc" to take care of bytes queued but not
used.
Thanks,
Stefano
2019 Oct 11
0
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...user space [exposed to the other peer] */
> > > tx_cnt /* increased when TX packet is sent to the other peer */
> > >
> > > /* remote vars */
> > > peer_buf_alloc /* peer's buf_alloc */
> > > peer_fwd_cnt /* peer's fwd_cnt */
> > >
> > > When a peer sends a packet, it increases the 'tx_cnt'; when the
> > > receiver consumes the packet (copy it to the user-space buffer), it
> > > increases the 'fwd_cnt'.
> > > Note:...
2013 Jun 27
0
[RFC 0/5] Introduce VM Sockets virtio transport
...n you describe connection teardown please?
I see there are RST and SHUTDOWN messages.
What rules do they obey?
>
> Virtio VM socket credit update:
> Virtio VM socket uses credit-based flow control. The sender maintains tx_cnt
> which counts the totoal number of bytes it has sent out, peer_fwd_cnt which
> counts the totoal number of byes the receiver has forwarded, and peer_buf_alloc
> which is the size of the receiver's receive buffer. The sender can send no more
> than the credit the receiver gives to the sender: credit = peer_buf_alloc -
> (tx_cnt - peer_fwd_cnt). The rece...
2019 Oct 14
0
[PATCH v4 1/5] vsock/virtio: limit the memory used per-socket
...user space [exposed to the other peer] */
> > > tx_cnt /* increased when TX packet is sent to the other peer */
> > >
> > > /* remote vars */
> > > peer_buf_alloc /* peer's buf_alloc */
> > > peer_fwd_cnt /* peer's fwd_cnt */
> > >
> > > When a peer sends a packet, it increases the 'tx_cnt'; when the
> > > receiver consumes the packet (copy it to the user-space buffer), it
> > > increases the 'fwd_cnt'.
> > > Note:...
2014 Jul 05
9
[RFC V2 0/7] Introduce VM Sockets virtio transport
...UEST to server
2) Server responses with VIRTIO_VSOCK_OP_RESPONSE to client
3) Client responses with VIRTIO_VSOCK_OP_ATTACH to server
Virtio VM socket credit update:
Virtio VM socket uses credit-based flow control. The sender maintains tx_cnt
which counts the totoal number of bytes it has sent out, peer_fwd_cnt which
counts the totoal number of byes the receiver has forwarded, and peer_buf_alloc
which is the size of the receiver's receive buffer. The sender can send no more
than the credit the receiver gives to the sender: credit = peer_buf_alloc -
(tx_cnt - peer_fwd_cnt). The receiver can send VIRTIO...