search for: buf_size_max

Displaying 20 results from an estimated 44 matches for "buf_size_max".

2019 Oct 09
2
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
..._common.c > @@ -403,17 +403,13 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk, > if (psk) { > struct virtio_vsock_sock *ptrans = psk->trans; > > - vvs->buf_size = ptrans->buf_size; > - vvs->buf_size_min = ptrans->buf_size_min; > - vvs->buf_size_max = ptrans->buf_size_max; > vvs->peer_buf_alloc = ptrans->peer_buf_alloc; > - } else { > - vvs->buf_size = VIRTIO_VSOCK_DEFAULT_BUF_SIZE; > - vvs->buf_size_min = VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE; > - vvs->buf_size_max = VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE; >...
2019 Oct 09
2
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
..._common.c > @@ -403,17 +403,13 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk, > if (psk) { > struct virtio_vsock_sock *ptrans = psk->trans; > > - vvs->buf_size = ptrans->buf_size; > - vvs->buf_size_min = ptrans->buf_size_min; > - vvs->buf_size_max = ptrans->buf_size_max; > vvs->peer_buf_alloc = ptrans->peer_buf_alloc; > - } else { > - vvs->buf_size = VIRTIO_VSOCK_DEFAULT_BUF_SIZE; > - vvs->buf_size_min = VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE; > - vvs->buf_size_max = VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE; >...
2019 Jun 03
1
[PATCH v3 2/5] vsock/virtio: fix locking for fwd_cnt and buf_alloc
From: Stefano Garzarella <sgarzare at redhat.com> Date: Fri, 31 May 2019 15:39:51 +0200 > @@ -434,7 +434,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock *vsk, u64 val) > if (val > vvs->buf_size_max) > vvs->buf_size_max = val; > vvs->buf_size = val; > + spin_lock_bh(&vvs->rx_lock); > vvs->buf_alloc = val; > + spin_unlock_bh(&vvs->rx_lock); This locking doesn't do anything other than to strongly order the buf_size store to occur before the buf_a...
2019 Oct 30
1
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
..._BUF_SIZE 0xFFFFFFFFUL > #define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64) > @@ -25,11 +22,6 @@ enum { > struct virtio_vsock_sock { > struct vsock_sock *vsk; > > - /* Protected by lock_sock(sk_vsock(trans->vsk)) */ > - u32 buf_size; > - u32 buf_size_min; > - u32 buf_size_max; > - > spinlock_t tx_lock; > spinlock_t rx_lock; > > @@ -93,12 +85,6 @@ s64 virtio_transport_stream_has_space(struct > vsock_sock *vsk); > > int virtio_transport_do_socket_init(struct vsock_sock *vsk, > struct vsock_sock *psk); > -u64 virtio_transport_get_...
2019 Sep 27
0
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...UF_SIZE (1024 * 4) #define VIRTIO_VSOCK_MAX_BUF_SIZE 0xFFFFFFFFUL #define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64) @@ -25,11 +22,6 @@ enum { struct virtio_vsock_sock { struct vsock_sock *vsk; - /* Protected by lock_sock(sk_vsock(trans->vsk)) */ - u32 buf_size; - u32 buf_size_min; - u32 buf_size_max; - spinlock_t tx_lock; spinlock_t rx_lock; @@ -93,12 +85,6 @@ s64 virtio_transport_stream_has_space(struct vsock_sock *vsk); int virtio_transport_do_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk); -u64 virtio_transport_get_buffer_size(struct vsock_sock *vsk); -u64 virtio...
2019 Oct 23
0
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...UF_SIZE (1024 * 4) #define VIRTIO_VSOCK_MAX_BUF_SIZE 0xFFFFFFFFUL #define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64) @@ -25,11 +22,6 @@ enum { struct virtio_vsock_sock { struct vsock_sock *vsk; - /* Protected by lock_sock(sk_vsock(trans->vsk)) */ - u32 buf_size; - u32 buf_size_min; - u32 buf_size_max; - spinlock_t tx_lock; spinlock_t rx_lock; @@ -93,12 +85,6 @@ s64 virtio_transport_stream_has_space(struct vsock_sock *vsk); int virtio_transport_do_socket_init(struct vsock_sock *vsk, struct vsock_sock *psk); -u64 virtio_transport_get_buffer_size(struct vsock_sock *vsk); -u64 virtio...
2019 Oct 10
0
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...,13 @@ int virtio_transport_do_socket_init(struct vsock_sock *vsk, > > if (psk) { > > struct virtio_vsock_sock *ptrans = psk->trans; > > > > - vvs->buf_size = ptrans->buf_size; > > - vvs->buf_size_min = ptrans->buf_size_min; > > - vvs->buf_size_max = ptrans->buf_size_max; > > vvs->peer_buf_alloc = ptrans->peer_buf_alloc; > > - } else { > > - vvs->buf_size = VIRTIO_VSOCK_DEFAULT_BUF_SIZE; > > - vvs->buf_size_min = VIRTIO_VSOCK_DEFAULT_MIN_BUF_SIZE; > > - vvs->buf_size_max = VIRTIO_VSOCK_DEF...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...SOCK_VQ_TX = 2, /* for guest to host data */ > + VSOCK_VQ_MAX = 3, > +}; > + > +/* virtio transport socket state */ > +struct virtio_transport { > + 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 tran...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...SOCK_VQ_TX = 2, /* for guest to host data */ > + VSOCK_VQ_MAX = 3, > +}; > + > +/* virtio transport socket state */ > +struct virtio_transport { > + 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 tran...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...0, + VSOCK_VQ_RX = 1, /* for host to guest data */ + VSOCK_VQ_TX = 2, /* for guest to host data */ + VSOCK_VQ_MAX = 3, +}; + +/* virtio transport socket state */ +struct virtio_transport { + 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 {...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...0, + VSOCK_VQ_RX = 1, /* for host to guest data */ + VSOCK_VQ_TX = 2, /* for guest to host data */ + VSOCK_VQ_MAX = 3, +}; + +/* virtio transport socket state */ +struct virtio_transport { + 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 {...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...SOCK_VQ_TX = 2, /* for guest to host data */ > + VSOCK_VQ_MAX = 3, > +}; > + > +/* virtio transport socket state */ > +struct virtio_transport { > + 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 tran...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...SOCK_VQ_TX = 2, /* for guest to host data */ > + VSOCK_VQ_MAX = 3, > +}; > + > +/* virtio transport socket state */ > +struct virtio_transport { > + 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 tran...
2019 May 31
0
[PATCH v3 2/5] vsock/virtio: fix locking for fwd_cnt and buf_alloc
...>hdr.buf_alloc = cpu_to_le32(vvs->buf_alloc); - spin_unlock_bh(&vvs->tx_lock); + spin_unlock_bh(&vvs->rx_lock); } EXPORT_SYMBOL_GPL(virtio_transport_inc_tx_pkt); @@ -434,7 +434,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock *vsk, u64 val) if (val > vvs->buf_size_max) vvs->buf_size_max = val; vvs->buf_size = val; + spin_lock_bh(&vvs->rx_lock); vvs->buf_alloc = val; + spin_unlock_bh(&vvs->rx_lock); } EXPORT_SYMBOL_GPL(virtio_transport_set_buffer_size); -- 2.20.1
2014 Jul 05
0
[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko
...0, + VSOCK_VQ_RX = 1, /* for host to guest data */ + VSOCK_VQ_TX = 2, /* for guest to host data */ + VSOCK_VQ_MAX = 3, +}; + +/* virtio transport socket state */ +struct virtio_transport { + 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 v...
2019 May 31
7
[PATCH v3 0/5] vsock/virtio: optimizations to increase the throughput
This series tries to increase the throughput of virtio-vsock with slight changes. While I was testing the v2 of this series I discovered an huge use of memory, so I added patch 1 to mitigate this issue. I put it in this series in order to better track the performance trends. v3: - Patch 1: added a threshold to copy only small packets [Jason] - Patch 1: replaced the allocation of a new buffer
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2015 Dec 09
9
[PATCH v3 0/4] Add virtio transport for AF_VSOCK
Note: the virtio-vsock device specification is currently under review but not yet finalized. Please review this code but don't merge until I send an update when the spec is finalized. Thanks! v3: * Remove unnecessary 3-way handshake, just do REQUEST/RESPONSE instead of REQUEST/RESPONSE/ACK * Remove SOCK_DGRAM support and focus on SOCK_STREAM first (also drop v2 Patch 1, it's
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all, this series adds the multi-transports support to vsock, following this proposal: https://www.spinics.net/lists/netdev/msg575792.html With the multi-transports support, we can use vsock with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Before this series, vmci-transport supported this behavior but only using
2019 Sep 27
29
[RFC PATCH 00/13] vsock: add multi-transports support
Hi all, this series adds the multi-transports support to vsock, following this proposal: https://www.spinics.net/lists/netdev/msg575792.html With the multi-transports support, we can use vsock with nested VMs (using also different hypervisors) loading both guest->host and host->guest transports at the same time. Before this series, vmci-transport supported this behavior but only using