lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210618072625.957837-1-keiichiw@chromium.org>
Date:   Fri, 18 Jun 2021 16:26:25 +0900
From:   Keiichi Watanabe <keiichiw@...omium.org>
To:     netdev@...r.kernel.org
Cc:     chirantan@...omium.org, "Michael S . Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        "David S . Miller" <davem@...emloft.net>,
        virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org,
        Keiichi Watanabe <keiichiw@...omium.org>
Subject: [PATCH] virtio_net: Enable MSI-X vector for ctrl queue

When we use vhost-user backend on the host, MSI-X vector should be set
so that the vmm can get an irq FD and send it to the backend device
process with vhost-user protocol.
Since whether the vector is set for a queue is determined depending on
the queue has a callback, this commit sets an empty callback for
virtio-net's control queue.

Signed-off-by: Keiichi Watanabe <keiichiw@...omium.org>
---
 drivers/net/virtio_net.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 11f722460513..002e3695d4b3 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2696,6 +2696,11 @@ static void virtnet_del_vqs(struct virtnet_info *vi)
 	virtnet_free_queues(vi);
 }
 
+static void virtnet_ctrlq_done(struct virtqueue *rvq)
+{
+	/* Do nothing */
+}
+
 /* How large should a single buffer be so a queue full of these can fit at
  * least one full packet?
  * Logic below assumes the mergeable buffer header is used.
@@ -2748,7 +2753,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
 
 	/* Parameters for control virtqueue, if any */
 	if (vi->has_cvq) {
-		callbacks[total_vqs - 1] = NULL;
+		callbacks[total_vqs - 1] = virtnet_ctrlq_done;
 		names[total_vqs - 1] = "control";
 	}
 
-- 
2.32.0.288.g62a8d224e6-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ