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:
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/
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
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
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_
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
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
> On Mon, May 19, 2025 at 03:06:46PM +0800, Xuewei Niu wrote:
> >This patchset introduces SIOCINQ ioctl support for vsock, indicating the
> >number of unread bytes.
>
> Thanks for this work, but please use net-next tree since this is a new
> feature:
> https://www
> On Mon, May 19, 2025 at 03:06:49PM +0800, Xuewei Niu wrote:
> >This patch adds two tests for ioctl SIOCINQ for SOCK_STREAM and
> >SOCK_SEQPACKET. The client waits for the server to send data, and checks if
> >the return value of the SIOCINQ is the size of the data. Then, con
> On Mon, May 19, 2025 at 03:06:48PM +0800, Xuewei Niu wrote:
> >The virtio_vsock_sock has a new field called bytes_unread as the return
> >value of the SIOCINQ ioctl.
> >
> >Though the rx_bytes exists, we introduce a bytes_unread field to the
> >virtio_vsock_s
inconsistency.
The byte_unread is increased by the length of the skbuff when skbuff is
enqueued, and it is decreased when dequeued.
Signed-off-by: Xuewei Niu
---
drivers/vhost/vsock.c | 1 +
include/linux/virtio_vsock.h| 2 ++
net/vmw_vsock/virtio_transport.c| 1
This patch adds two tests for ioctl SIOCINQ for SOCK_STREAM and
SOCK_SEQPACKET. The client waits for the server to send data, and checks if
the return value of the SIOCINQ is the size of the data. Then, consumes the
data and checks if the value is 0.
Signed-off-by: Xuewei Niu
---
tools/testing
This patch adds support for SIOCINQ ioctl, which returns the number of
bytes unread in the socket.
Signed-off-by: Xuewei Niu
---
include/net/af_vsock.h | 2 ++
net/vmw_vsock/af_vsock.c | 22 ++
2 files changed, 24 insertions(+)
diff --git a/include/net/af_vsock.h b
implements the SIOCINQ ioctl for all virtio-based transports.
The last one adds two test cases to check the functionality. The changes
have been tested, and the results are as expected.
Signed-off-by: Xuewei Niu
Xuewei Niu (3):
vsock: Add support for SIOCINQ ioctl
vsock/virtio: Add SIOCINQ
> On Wed, May 21, 2025 at 10:06:13AM +0800, Xuewei Niu wrote:
> >> On Mon, May 19, 2025 at 03:06:48PM +0800, Xuewei Niu wrote:
> >> >The virtio_vsock_sock has a new field called bytes_unread as the return
> >> >value of the SIOCINQ ioctl.
> >> >
> On Wed, 21 May 2025 at 10:58, Stefano Garzarella wrote:
> >
> > Forgot to CC Arseniy.
> >
> > On Wed, 21 May 2025 at 10:57, Stefano Garzarella
> > wrote:
> > >
> > > On Wed, May 21, 2025 at 10:06:13AM +0800, Xuewei Niu wrote:
> > > &
No comments since last month.
The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this
patch. Could I get more eyes on this one?
[1]:
https://lore.kernel.org/lkml/bbn4lvdwh42m2zvi3rdyws66y5ulew32rchtz3kxirqlllkr63@7toa4tcepax3/#t
Thanks,
Xuewei
> On Thu, 12 Jun 2025 at 10:21, Xuewei Niu wrote:
> >
> > > On Thu, 12 Jun 2025 at 08:50, Xuewei Niu wrote:
> > > >
> > > > > On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote:
> > > > > > No comments since last month.
> On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote:
> > No comments since last month.
> >
> > The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this
> > patch. Could I get more eyes on this one?
> >
> >
> On Thu, 12 Jun 2025 at 08:50, Xuewei Niu wrote:
> >
> > > On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote:
> > > > No comments since last month.
> > > >
> > > > The patch [1], which adds SIOCINQ ioctl support for vsock, depends on
This patch adds SIOCINQ ioctl tests for both SOCK_STREAM and
SOCK_SEQPACKET.
The client waits for the server to send data, and checks if the SIOCINQ
ioctl value matches the data size. After consuming the data, the client
checks if the SIOCINQ value is 0.
Signed-off-by: Xuewei Niu
---
tools
The value of the SIOCINQ is obtained by `virtio_transport_unread_bytes()`,
which is generic for all virtio transports. The function acquires the
`rx_lock` and returns the value of `rx_bytes`.
Signed-off-by: Xuewei Niu
---
drivers/vhost/vsock.c | 1 +
include/linux
implements the SIOCINQ ioctl for all virtio-based transports.
The last one adds two test cases to check the functionality. The changes
have been tested, and the results are as expected.
Signed-off-by: Xuewei Niu
--
v1->v2:
https://lore.kernel.org/lkml/20250519070649.3063874-1-niuxue
This patch adds support for SIOCINQ ioctl, which returns the number of
bytes unread in the socket.
Signed-off-by: Xuewei Niu
---
include/net/af_vsock.h | 2 ++
net/vmw_vsock/af_vsock.c | 22 ++
2 files changed, 24 insertions(+)
diff --git a/include/net/af_vsock.h b
> On Tue, Jun 17, 2025 at 12:53:45PM +0800, Xuewei Niu wrote:
> >Wrap the ioctl in `ioctl_int()`, which takes a pointer to the actual
> >int value and an expected int value. The function will not return until
> >either the ioctl returns the expected value or a timeout occ
to prevent immediate failure.
The last one adds two test cases to check the functionality. The changes
have been tested, and the results are as expected.
Signed-off-by: Xuewei Niu
--
v1->v2:
https://lore.kernel.org/lkml/20250519070649.3063874-1-niuxuewei@antgroup.com/
- Use net-next t
Add support for SIOCINQ ioctl, indicating the length of bytes unread in the
socket. The value is obtained from `vsock_stream_has_data()`.
Signed-off-by: Xuewei Niu
---
net/vmw_vsock/af_vsock.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/net/vmw_vsock/af_vsock.c b
> On Tue, Jun 17, 2025 at 12:53:46PM +0800, Xuewei Niu wrote:
> >Add SIOCINQ ioctl tests for both SOCK_STREAM and SOCK_SEQPACKET.
> >
> >The client waits for the server to send data, and checks if the SIOCINQ
> >ioctl value matches the data size. After consuming the da
> On Fri, Jun 13, 2025 at 11:11:52AM +0800, Xuewei Niu wrote:
> >This patch adds SIOCINQ ioctl tests for both SOCK_STREAM and
> >SOCK_SEQPACKET.
> >
> >The client waits for the server to send data, and checks if the SIOCINQ
> >ioctl value matches the data size. Aft
> On Mon, Jun 16, 2025 at 03:42:53PM +0200, Luigi Leonardi wrote:
> >On Fri, Jun 13, 2025 at 11:11:50AM +0800, Xuewei Niu wrote:
> >>This patch adds support for SIOCINQ ioctl, which returns the number of
> >>bytes unread in the socket.
> >>
> >>Signe
> On Fri, Jun 13, 2025 at 11:11:50AM +0800, Xuewei Niu wrote:
> >This patch adds support for SIOCINQ ioctl, which returns the number of
> >bytes unread in the socket.
> >
> >Signed-off-by: Xuewei Niu
> >---
> > include/net/af_vsock.h |
Add SIOCINQ ioctl tests for both SOCK_STREAM and SOCK_SEQPACKET.
The client waits for the server to send data, and checks if the SIOCINQ
ioctl value matches the data size. After consuming the data, the client
checks if the SIOCINQ value is 0.
Signed-off-by: Xuewei Niu
---
tools/testing/vsock
Wrap the ioctl in `ioctl_int()`, which takes a pointer to the actual
int value and an expected int value. The function will not return until
either the ioctl returns the expected value or a timeout occurs, thus
avoiding immediate failure.
Signed-off-by: Xuewei Niu
---
tools/testing/vsock/util.c
33 matches
Mail list logo