Displaying 20 results from an estimated 107 matches for "virtio_vsock_sock".
2019 Sep 03
2
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...+---
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
> index 7d973903f52e..49fc9d20bc43 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -41,6 +41,7 @@ struct virtio_vsock_sock {
>
> /* Protected by rx_lock */
> u32 fwd_cnt;
> + u32 last_fwd_cnt;
> u32 rx_bytes;
> struct list_head rx_queue;
> };
> diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
> index 095221f94786..a85559d4d974 100644
&g...
2019 Sep 03
2
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...+---
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
> index 7d973903f52e..49fc9d20bc43 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -41,6 +41,7 @@ struct virtio_vsock_sock {
>
> /* Protected by rx_lock */
> u32 fwd_cnt;
> + u32 last_fwd_cnt;
> u32 rx_bytes;
> struct list_head rx_queue;
> };
> diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
> index 095221f94786..a85559d4d974 100644
&g...
2019 Jul 17
1
[PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()
...++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/virtio_vsock.h 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...
2019 May 12
1
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> static struct sk_buff *virtio_transport_build_skb(void *opaque)
> {
> @@ -190,17 +233,15 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
> return virtio_transport_get_ops()->send_pkt(pkt);
> }
>
> -static void virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs,
> - struct virtio_vsock_pkt *pkt)
> +static void virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs, u32 len)
> {
> - vvs->rx_bytes += pkt->len;
> + vvs->rx_bytes += len;
> }
>
> -static void virtio_transport_dec_rx_pkt(struct virtio_vsock_sock...
2019 Apr 04
1
[PATCH RFC 1/4] vsock/virtio: reduce credit update messages
..._transport_common.c | 14 +++++++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index e223e2632edd..6d7a22cc20bf 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -37,6 +37,7 @@ struct virtio_vsock_sock {
u32 tx_cnt;
u32 buf_alloc;
u32 peer_fwd_cnt;
+ u32 last_fwd_cnt;
u32 peer_buf_alloc;
/* Protected by rx_lock */
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 602715fc9a75..f32301d823f5 100644
--- a/net/vmw_vsock/virtio_transport_c...
2019 May 10
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...ee(buf);
+}
+
/* Packet capture */
static struct sk_buff *virtio_transport_build_skb(void *opaque)
{
@@ -190,17 +233,15 @@ static int virtio_transport_send_pkt_info(struct vsock_sock *vsk,
return virtio_transport_get_ops()->send_pkt(pkt);
}
-static void virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs,
- struct virtio_vsock_pkt *pkt)
+static void virtio_transport_inc_rx_pkt(struct virtio_vsock_sock *vvs, u32 len)
{
- vvs->rx_bytes += pkt->len;
+ vvs->rx_bytes += len;
}
-static void virtio_transport_dec_rx_pkt(struct virtio_vsock_sock *vvs,
- struct virtio_vsock_pkt *pkt...
2019 Oct 30
1
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...LT_BUF_SIZE (1024 * 256)
> -#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
> #define VIRTIO_VSOCK_DEFAULT_RX_BUF_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...
2016 Dec 08
1
[PATCH v2 4/4] vsock: cancel packets when failing to connect
..., 14 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
> index b92e88d..ff6850a 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -156,4 +156,11 @@ void virtio_transport_inc_tx_pkt(struct virtio_vsock_sock *vvs, struct virtio_vs
> u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
> void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
>
> +static inline const struct virtio_transport *virtio_transport_get_ops(void)
> +{
> + const s...
2016 Dec 08
1
[PATCH v2 4/4] vsock: cancel packets when failing to connect
..., 14 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
> index b92e88d..ff6850a 100644
> --- a/include/linux/virtio_vsock.h
> +++ b/include/linux/virtio_vsock.h
> @@ -156,4 +156,11 @@ void virtio_transport_inc_tx_pkt(struct virtio_vsock_sock *vvs, struct virtio_vs
> u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
> void virtio_transport_put_credit(struct virtio_vsock_sock *vvs, u32 credit);
>
> +static inline const struct virtio_transport *virtio_transport_get_ops(void)
> +{
> + const s...
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory
and a memory leak in the virtio-vsock driver in the guest when I sent
1-byte packets to the guest.
These issues are present since the introduction of the virtio-vsock
driver. I added the patches 1 and 2 to fix them in this series in order
to better track the performance trends.
v1:
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory
and a memory leak in the virtio-vsock driver in the guest when I sent
1-byte packets to the guest.
These issues are present since the introduction of the virtio-vsock
driver. I added the patches 1 and 2 to fix them in this series in order
to better track the performance trends.
v1:
2019 Jul 17
0
[PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()
...vsock/virtio_transport_common.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/virtio_vsock.h 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...
2019 Jul 17
0
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...ransport_common.c | 16 +++++++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
index 7d973903f52e..49fc9d20bc43 100644
--- a/include/linux/virtio_vsock.h
+++ b/include/linux/virtio_vsock.h
@@ -41,6 +41,7 @@ struct virtio_vsock_sock {
/* Protected by rx_lock */
u32 fwd_cnt;
+ u32 last_fwd_cnt;
u32 rx_bytes;
struct list_head rx_queue;
};
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index 095221f94786..a85559d4d974 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+...
2019 Sep 03
0
[PATCH v4 2/5] vsock/virtio: reduce credit update messages
...insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h
> > index 7d973903f52e..49fc9d20bc43 100644
> > --- a/include/linux/virtio_vsock.h
> > +++ b/include/linux/virtio_vsock.h
> > @@ -41,6 +41,7 @@ struct virtio_vsock_sock {
> >
> > /* Protected by rx_lock */
> > u32 fwd_cnt;
> > + u32 last_fwd_cnt;
> > u32 rx_bytes;
> > struct list_head rx_queue;
> > };
> > diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
> &g...
2019 Sep 27
0
[RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core
...28
-#define VIRTIO_VSOCK_DEFAULT_BUF_SIZE (1024 * 256)
-#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
#define VIRTIO_VSOCK_DEFAULT_RX_BUF_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_...
2019 Oct 23
0
[PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core
...28
-#define VIRTIO_VSOCK_DEFAULT_BUF_SIZE (1024 * 256)
-#define VIRTIO_VSOCK_DEFAULT_MAX_BUF_SIZE (1024 * 256)
#define VIRTIO_VSOCK_DEFAULT_RX_BUF_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_...
2019 Oct 17
3
[PATCH net 0/2] vsock/virtio: make the credit mechanism more robust
This series makes the credit mechanism implemented in the
virtio-vsock devices more robust.
Patch 1 sends an update to the remote peer when the buf_alloc
change.
Patch 2 prevents a malicious peer (especially the guest) can
consume all the memory of the other peer, discarding packets
when the credit available is not respected.
Stefano Garzarella (2):
vsock/virtio: send a credit update when
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
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6).
I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but
first I want to share the latest version of the code. Several people are
playing with vsock now so sharing the latest code should avoid duplicate work.
v5:
* Transport reset event for live migration support
* Reorder virtqueues, drop unused
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6).
I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but
first I want to share the latest version of the code. Several people are
playing with vsock now so sharing the latest code should avoid duplicate work.
v5:
* Transport reset event for live migration support
* Reorder virtqueues, drop unused