Re: Re: [RFC PATCH 0/5] vsock/virtio: Add support for multi-devices

2024-05-29 Thread Xuewei Niu
Hi, MST! > > include/linux/virtio_vsock.h| 2 +- > > include/net/af_vsock.h | 25 ++- > > include/uapi/linux/virtio_vsock.h | 1 + > > include/uapi/linux/vm_sockets.h | 14 ++ > > net/vmw_vsock/af_vsock.c| 116 +-- > > net/v

[RFC PATCH 5/5] vsock: Add an ioctl request to get all CIDs

2024-05-17 Thread Xuewei Niu
The new request is called `IOCTL_VM_SOCKETS_GET_LOCAL_CIDS`. And the old one, `IOCTL_VM_SOCKETS_GET_LOCAL_CID` is retained. For the transport that supports multi-devices: * `IOCTL_VM_SOCKETS_GET_LOCAL_CID` returns "-1"; * `IOCTL_VM_SOCKETS_GET_LOCAL_CIDS` returns a vector of CIDS. The usage is sh

[RFC PATCH 4/5] vsock: seqpacket_allow adapts to multi-devices

2024-05-17 Thread Xuewei Niu
Adds a new argument, named "src_cid", to let them know which `virtio_vsock` to be selected. Signed-off-by: Xuewei Niu --- include/net/af_vsock.h | 2 +- net/vmw_vsock/af_vsock.c | 15 +-- net/vmw_vsock/virtio_transport.c | 4 ++-- net/vmw_vsock/vsock_

[RFC PATCH 3/5] vsock/virtio: can_msgzerocopy adapts to multi-devices

2024-05-17 Thread Xuewei Niu
Adds a new argument, named "cid", to let them know which `virtio_vsock` to be selected. Signed-off-by: Xuewei Niu --- include/linux/virtio_vsock.h| 2 +- net/vmw_vsock/virtio_transport.c| 5 ++--- net/vmw_vsock/virtio_transport_common.c | 6 +++--- 3 files

[RFC PATCH 2/5] vsock/virtio: Add support for multi-devices

2024-05-17 Thread Xuewei Niu
The devices are inserted into the list when probing. The kernel will deny devices from being registered if there are conflicts existing in CIDs or orders. Signed-off-by: Xuewei Niu --- include/net/af_vsock.h | 16 ++ include/uapi/linux/vm_sockets.h | 6 + net/vmw_vsock

[RFC PATCH 1/5] vsock/virtio: Extend virtio-vsock spec with an "order" field

2024-05-17 Thread Xuewei Niu
ce, but is required for the mode of multiple devices. Signed-off-by: Xuewei Niu --- include/uapi/linux/virtio_vsock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/virtio_vsock.h b/include/uapi/linux/virtio_vsock.h index 64738838bee5..b62ec7d2ab1e 100644 --- a/include/

[RFC PATCH 0/5] vsock/virtio: Add support for multi-devices

2024-05-17 Thread Xuewei Niu
amp;host_port); n = write(fd, buffer); ``` # Use Cases We've completed a POC with Kata Containers, Ztunnel, which is a purpose-built per-node proxy for Istio ambient mesh, and TSI. Please refer to the following link for more details. Link: https://bit.ly/4bdPJbU Xuewei Niu (5): vsock/virtio: