From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BC5EA1B104 for ; Wed, 21 Nov 2018 17:06:40 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 296F92D2BEB; Wed, 21 Nov 2018 16:06:40 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30E6A608E7; Wed, 21 Nov 2018 16:06:36 +0000 (UTC) From: Kevin Traynor To: Tiwei Bie Cc: Maxime Coquelin , dpdk stable Date: Wed, 21 Nov 2018 16:04:25 +0000 Message-Id: <20181121160440.9014-35-ktraynor@redhat.com> In-Reply-To: <20181121160440.9014-1-ktraynor@redhat.com> References: <20181121160440.9014-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Nov 2018 16:06:40 +0000 (UTC) Subject: [dpdk-stable] patch 'net/virtio-user: fix multiple queue for vhost-kernel' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 16:06:41 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 52d21556f0890247a4dddcfcfffb01e4bc3a0070 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Fri, 21 Sep 2018 20:52:42 +0800 Subject: [PATCH] net/virtio-user: fix multiple queue for vhost-kernel [ upstream commit 21b90f790a5fd41875610440b888015aa9b0a460 ] The multiple queue support in vhost-kernel is broken because the dev->vhostfd is only available for vhost-user. We should always try to enable queue pairs when it's not in server mode. Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode") Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 869e96f87..55a82e4b0 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -550,11 +550,9 @@ virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs) * always return 0 in this case. */ - if (dev->vhostfd >= 0) { + if (!dev->is_server || dev->vhostfd >= 0) { for (i = 0; i < q_pairs; ++i) ret |= dev->ops->enable_qp(dev, i, 1); for (i = q_pairs; i < dev->max_queue_pairs; ++i) ret |= dev->ops->enable_qp(dev, i, 0); - } else if (!dev->is_server) { - ret = ~0; } dev->queue_pairs = q_pairs; -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 15:59:14.517228661 +0000 +++ 0035-net-virtio-user-fix-multiple-queue-for-vhost-kernel.patch 2018-11-21 15:59:13.000000000 +0000 @@ -1,14 +1,15 @@ -From 21b90f790a5fd41875610440b888015aa9b0a460 Mon Sep 17 00:00:00 2001 +From 52d21556f0890247a4dddcfcfffb01e4bc3a0070 Mon Sep 17 00:00:00 2001 From: Tiwei Bie Date: Fri, 21 Sep 2018 20:52:42 +0800 Subject: [PATCH] net/virtio-user: fix multiple queue for vhost-kernel +[ upstream commit 21b90f790a5fd41875610440b888015aa9b0a460 ] + The multiple queue support in vhost-kernel is broken because the dev->vhostfd is only available for vhost-user. We should always try to enable queue pairs when it's not in server mode. Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode") -Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin