From: Luigi Leonardi via B4 Relay <devnull+luigi.leonardi.outlook.com@kernel.org>
To: "Stefano Garzarella" <sgarzare@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>
Cc: virtualization@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Luigi Leonardi <luigi.leonardi@outlook.com>,
Daan De Meyer <daan.j.demeyer@gmail.com>
Subject: [PATCH net-next v3 0/3] ioctl support for AF_VSOCK and virtio-based transports
Date: Wed, 26 Jun 2024 14:08:34 +0200 [thread overview]
Message-ID: <20240626-ioctl_next-v3-0-63be5bf19a40@outlook.com> (raw)
This patch series introduce the support for ioctl(s) in AF_VSOCK.
The only ioctl currently available is SIOCOUTQ, which returns
the number of unsent or unacked packets. It is available for
SOCK_STREAM, SOCK_SEQPACKET and SOCK_DGRAM.
As this information is transport-dependent, a new optional callback
is introduced: unsent_bytes.
The first patch add ioctl support in AF_VSOCK, while the second
patch introduce support for SOCK_STREAM and SOCK_SEQPACKET
in all virtio-based transports: virtio_transport (G2H),
vhost-vsock (H2G) and vsock-loopback.
The latest patch introduce two tests for this new feature.
More details can be found in each patch changelog.
v2->v3
Applied all reviewers' suggetions:
- Minor style and code changes
- atomic_int replaced with an existing spin_lock.
Introduced lock_sock on ioctl call.
Rebased to latest net-next
v1->v2
Applied all Stefano's suggestions:
- vsock_do_ioctl has been rewritten
- ioctl(SIOCOUTQ) test is skipped when it is not supported
- Minor variable/function name changes
- rebased to latest net-next
Signed-off-by: Luigi Leonardi <luigi.leonardi@outlook.com>
---
Luigi Leonardi (3):
vsock: add support for SIOCOUTQ ioctl for all vsock socket types.
vsock/virtio: add SIOCOUTQ support for all virtio based transports
test/vsock: add ioctl unsent bytes test
drivers/vhost/vsock.c | 4 +-
include/linux/virtio_vsock.h | 7 +++
include/net/af_vsock.h | 3 ++
net/vmw_vsock/af_vsock.c | 60 +++++++++++++++++++++--
net/vmw_vsock/virtio_transport.c | 4 +-
net/vmw_vsock/virtio_transport_common.c | 35 ++++++++++++++
net/vmw_vsock/vsock_loopback.c | 7 +++
tools/testing/vsock/util.c | 6 +--
tools/testing/vsock/util.h | 3 ++
tools/testing/vsock/vsock_test.c | 85 +++++++++++++++++++++++++++++++++
10 files changed, 206 insertions(+), 8 deletions(-)
---
base-commit: 50b70845fc5c22cf7e7d25b57d57b3dca1725aa5
change-id: 20240626-ioctl_next-fbbcdd596063
Best regards,
--
Luigi Leonardi <luigi.leonardi@outlook.com>
next reply other threads:[~2024-06-26 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 12:08 Luigi Leonardi via B4 Relay [this message]
2024-06-26 12:08 ` [PATCH net-next v3 1/3] vsock: add support for SIOCOUTQ ioctl for all vsock socket types Luigi Leonardi via B4 Relay
2024-06-27 10:34 ` kernel test robot
2024-06-28 6:15 ` kernel test robot
2024-06-28 9:09 ` Stefano Garzarella
2024-06-28 13:42 ` kernel test robot
2024-06-26 12:08 ` [PATCH net-next v3 2/3] vsock/virtio: add SIOCOUTQ support for all virtio based transports Luigi Leonardi via B4 Relay
2024-06-28 11:16 ` Stefano Garzarella
2024-06-26 12:08 ` [PATCH net-next v3 3/3] test/vsock: add ioctl unsent bytes test Luigi Leonardi via B4 Relay
2024-07-15 16:03 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240626-ioctl_next-v3-0-63be5bf19a40@outlook.com \
--to=devnull+luigi.leonardi.outlook.com@kernel.org \
--cc=daan.j.demeyer@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luigi.leonardi@outlook.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®