Thread (42 messages) 42 messages, 4 authors, 2019-10-11

RE: [RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core

From: Dexuan Cui <decui@microsoft.com>
Date: 2019-10-03 20:12:16
Also in: kvm, linux-hyperv, lkml

From: Stefano Garzarella <sgarzare@redhat.com>
Sent: Friday, September 27, 2019 4:27 AM
To: netdev@vger.kernel.org

virtio_transport and vmci_transport handle the buffer_size
sockopts in a very similar way.

In order to support multiple transports, this patch moves this
handling in the core to allow the user to change the options
also if the socket is not yet assigned to any transport.

This patch also adds the '.notify_buffer_size' callback in the
'struct virtio_transport' in order to inform the transport,
when the buffer_size is changed by the user. It is also useful
to limit the 'buffer_size' requested (e.g. virtio transports).

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
 drivers/vhost/vsock.c                   |  7 +-
 include/linux/virtio_vsock.h            | 15 +----
 include/net/af_vsock.h                  | 14 ++--
 net/vmw_vsock/af_vsock.c                | 43 ++++++++++---
 net/vmw_vsock/hyperv_transport.c        | 36 -----------
 net/vmw_vsock/virtio_transport.c        |  8 +--
 net/vmw_vsock/virtio_transport_common.c | 78 ++++------------------
 net/vmw_vsock/vmci_transport.c          | 86 +++----------------------
 net/vmw_vsock/vmci_transport.h          |  3 -
 9 files changed, 64 insertions(+), 226 deletions(-)
The hv_sock part (hyperv_transport.c) looks good to me.

Acked-by: Dexuan Cui <decui@microsoft.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help