On Thu, Jun 10, 2021 at 2:40 AM Stefano Garzarella <sgarz...@redhat.com> wrote: > > On Thu, Jun 10, 2021 at 12:14:24AM +0000, Jiang Wang wrote: > >Datagram sockets are connectionless and unreliable. > >The sender does not know the capacity of the receiver > >and may send more packets than the receiver can handle. > > > >Add two more dedicate virtqueues for datagram sockets, > >so that it will not unfairly steal resources from > >stream and future connection-oriented sockets. > > > >The virtio spec patch is here: > >https://www.spinics.net/lists/linux-virtualization/msg50027.html > > > >Here is the link for the linux kernel git repo with patches > >to support dgram sockets: > >https://github.com/Jiang1155/linux/tree/vsock-dgram-v1 > > > >Signed-off-by: Jiang Wang <jiang.w...@bytedance.com> > >--- > > configure | 13 +++++++++++++ > > hw/virtio/vhost-vsock-common.c | 11 ++++++++++- > > hw/virtio/vhost-vsock.c | 8 +++++--- > > include/hw/virtio/vhost-vsock-common.h | 10 +++++++++- > > include/standard-headers/linux/virtio_vsock.h | 3 +++ > > meson.build | 1 + > > 6 files changed, 41 insertions(+), 5 deletions(-) > > > >diff --git a/configure b/configure > >index 9f016b06b5..6455b283a5 100755 > >--- a/configure > >+++ b/configure > >@@ -343,6 +343,7 @@ vhost_net="$default_feature" > > vhost_crypto="$default_feature" > > vhost_scsi="$default_feature" > > vhost_vsock="$default_feature" > >+vhost_vsock_dgram="no" > > vhost_user="no" > > vhost_user_blk_server="auto" > > vhost_user_fs="$default_feature" > >@@ -1272,6 +1273,10 @@ for opt do > > ;; > > --enable-vhost-vsock) vhost_vsock="yes" > > ;; > >+ --disable-vhost-vsock-dgram) vhost_vsock_dgram="no" > >+ ;; > >+ --enable-vhost-vsock-dgram) vhost_vsock_dgram="yes" > >+ ;; > > I don't think we should add a configuration option to enable/disable the > dgram support at build time. > > I think we should do it at runtime looking at the features negiotated. > > Take a look at virtio_net_set_multiqueue().
Got it. Will check. Thanks. > Thanks, > Stefano >