From: Jiang Wang <jiang.wang@bytedance.com> To: jiangleetcode@gmail.com Cc: virtualization@lists.linux-foundation.org, stefanha@redhat.com, sgarzare@redhat.com, mst@redhat.com, arseny.krasnov@kaspersky.com, jhansen@vmware.com, cong.wang@bytedance.com, duanxiongchun@bytedance.com, xieyongji@bytedance.com, chaiwen.cc@bytedance.com, Jason Wang <jasowang@redhat.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC v2 0/5] virtio/vsock: introduce SOCK_DGRAM support Date: Tue, 14 Sep 2021 05:54:33 +0000 [thread overview] Message-ID: <20210914055440.3121004-1-jiang.wang@bytedance.com> (raw) This patchset implements support of SOCK_DGRAM for virtio transport. Datagram sockets are connectionless and unreliable. To avoid unfair contention with stream and other sockets, add two more virtqueues and a new feature bit to indicate if those two new queues exist or not. Dgram does not use the existing credit update mechanism for stream sockets. When sending from the guest/driver, sending packets synchronously, so the sender will get an error when the virtqueue is full. When sending from the host/device, send packets asynchronously because the descriptor memory belongs to the corresponding QEMU process. The virtio spec patch is here: https://www.mail-archive.com/virtualization@lists.linux-foundation.org/msg47457.html For those who prefer git repo, here is the link for the linux kernel: https://github.com/Jiang1155/linux/tree/vsock-dgram-v2 qemu patch link: https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg03462.html To do: 1. use skb when receiving packets 2. support multiple transport 3. support mergeable rx buffer 4. support disabling F_STREAM feature bit v1 -> v2 : - fix migration bug in vhost-vsock - rename some variables - clean up some code in virtio-vsock - use le_to_cpu16 in virtio-vsock Jiang Wang (5): virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit virtio/vsock: add support for virtio datagram vhost/vsock: add support for vhost dgram. vsock_test: add tests for vsock dgram virtio/vsock: add sysfs for rx buf len for dgram drivers/vhost/vsock.c | 220 +++++++-- include/linux/virtio_vsock.h | 9 + include/net/af_vsock.h | 1 + .../events/vsock_virtio_transport_common.h | 2 + include/uapi/linux/virtio_vsock.h | 3 + net/vmw_vsock/af_vsock.c | 12 + net/vmw_vsock/virtio_transport.c | 463 +++++++++++++++--- net/vmw_vsock/virtio_transport_common.c | 181 ++++++- tools/testing/vsock/util.c | 105 ++++ tools/testing/vsock/util.h | 4 + tools/testing/vsock/vsock_test.c | 195 ++++++++ 11 files changed, 1083 insertions(+), 112 deletions(-) -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Jiang Wang <jiang.wang@bytedance.com> To: jiangleetcode@gmail.com Cc: cong.wang@bytedance.com, duanxiongchun@bytedance.com, kvm@vger.kernel.org, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, virtualization@lists.linux-foundation.org, xieyongji@bytedance.com, chaiwen.cc@bytedance.com, stefanha@redhat.com, Jakub Kicinski <kuba@kernel.org>, arseny.krasnov@kaspersky.com, Ingo Molnar <mingo@redhat.com>, "David S. Miller" <davem@davemloft.net>, jhansen@vmware.com Subject: [RFC v2 0/5] virtio/vsock: introduce SOCK_DGRAM support Date: Tue, 14 Sep 2021 05:54:33 +0000 [thread overview] Message-ID: <20210914055440.3121004-1-jiang.wang@bytedance.com> (raw) This patchset implements support of SOCK_DGRAM for virtio transport. Datagram sockets are connectionless and unreliable. To avoid unfair contention with stream and other sockets, add two more virtqueues and a new feature bit to indicate if those two new queues exist or not. Dgram does not use the existing credit update mechanism for stream sockets. When sending from the guest/driver, sending packets synchronously, so the sender will get an error when the virtqueue is full. When sending from the host/device, send packets asynchronously because the descriptor memory belongs to the corresponding QEMU process. The virtio spec patch is here: https://www.mail-archive.com/virtualization@lists.linux-foundation.org/msg47457.html For those who prefer git repo, here is the link for the linux kernel: https://github.com/Jiang1155/linux/tree/vsock-dgram-v2 qemu patch link: https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg03462.html To do: 1. use skb when receiving packets 2. support multiple transport 3. support mergeable rx buffer 4. support disabling F_STREAM feature bit v1 -> v2 : - fix migration bug in vhost-vsock - rename some variables - clean up some code in virtio-vsock - use le_to_cpu16 in virtio-vsock Jiang Wang (5): virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit virtio/vsock: add support for virtio datagram vhost/vsock: add support for vhost dgram. vsock_test: add tests for vsock dgram virtio/vsock: add sysfs for rx buf len for dgram drivers/vhost/vsock.c | 220 +++++++-- include/linux/virtio_vsock.h | 9 + include/net/af_vsock.h | 1 + .../events/vsock_virtio_transport_common.h | 2 + include/uapi/linux/virtio_vsock.h | 3 + net/vmw_vsock/af_vsock.c | 12 + net/vmw_vsock/virtio_transport.c | 463 +++++++++++++++--- net/vmw_vsock/virtio_transport_common.c | 181 ++++++- tools/testing/vsock/util.c | 105 ++++ tools/testing/vsock/util.h | 4 + tools/testing/vsock/vsock_test.c | 195 ++++++++ 11 files changed, 1083 insertions(+), 112 deletions(-) -- 2.20.1 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next reply other threads:[~2021-09-14 5:55 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-14 5:54 Jiang Wang [this message] 2021-09-14 5:54 ` [RFC v2 0/5] virtio/vsock: introduce SOCK_DGRAM support Jiang Wang 2021-09-14 5:54 ` [RFC v2 1/5] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit Jiang Wang 2021-09-14 5:54 ` Jiang Wang 2021-09-14 5:54 ` [RFC v2 2/5] virtio/vsock: add support for virtio datagram Jiang Wang 2021-09-14 5:54 ` Jiang Wang 2021-09-14 6:56 ` Michael S. Tsirkin 2021-09-14 6:56 ` Michael S. Tsirkin 2021-09-14 5:54 ` [RFC v2 3/5] vhost/vsock: add support for vhost dgram Jiang Wang 2021-09-14 5:54 ` Jiang Wang 2021-09-14 6:52 ` Michael S. Tsirkin 2021-09-14 6:52 ` Michael S. Tsirkin 2021-09-14 5:54 ` [RFC v2 4/5] vsock_test: add tests for vsock dgram Jiang Wang 2021-09-14 5:54 ` Jiang Wang 2021-09-14 5:54 ` [RFC v2 5/5] virtio/vsock: add sysfs for rx buf len for dgram Jiang Wang 2021-09-14 5:54 ` Jiang Wang
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=20210914055440.3121004-1-jiang.wang@bytedance.com \ --to=jiang.wang@bytedance.com \ --cc=arseny.krasnov@kaspersky.com \ --cc=chaiwen.cc@bytedance.com \ --cc=cong.wang@bytedance.com \ --cc=davem@davemloft.net \ --cc=duanxiongchun@bytedance.com \ --cc=jasowang@redhat.com \ --cc=jhansen@vmware.com \ --cc=jiangleetcode@gmail.com \ --cc=kuba@kernel.org \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=rostedt@goodmis.org \ --cc=sgarzare@redhat.com \ --cc=stefanha@redhat.com \ --cc=virtualization@lists.linux-foundation.org \ --cc=xieyongji@bytedance.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.