From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E450A3160 for ; Wed, 9 Oct 2019 14:32:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 146F71C21E; Wed, 9 Oct 2019 14:32:36 +0200 (CEST) Received: from dispatchb-us1.ppe-hosted.com (dispatchb-us1.ppe-hosted.com [148.163.129.53]) by dpdk.org (Postfix) with ESMTP id C36131C208; Wed, 9 Oct 2019 14:32:31 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 7672B1C00BE; Wed, 9 Oct 2019 12:32:30 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 9 Oct 2019 05:32:27 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 9 Oct 2019 05:32:26 -0700 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id x99CWORT021029; Wed, 9 Oct 2019 13:32:24 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 1E3461613D3; Wed, 9 Oct 2019 13:32:24 +0100 (BST) From: Andrew Rybchenko To: Maxime Coquelin , Tiwei Bie , Zhihong Wang CC: , Dilshod Urazov , Date: Wed, 9 Oct 2019 13:32:07 +0100 Message-ID: <1570624330-19119-3-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1570624330-19119-1-git-send-email-arybchenko@solarflare.com> References: <1569944672-24754-1-git-send-email-arybchenko@solarflare.com> <1570624330-19119-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24964.005 X-TM-AS-Result: No-5.806600-4.000000-10 X-TMASE-MatchedRID: GhdZ4a7VZuOB//TxCalW+rSkeRV328rMQ37rdi3NWIeyZWVsxGDcQPBU q5JsuvxSd04MXTR6LNu9OBOpEk05whf+TLxNffg6MiMrbc70PfcHgh3sKJBzP1fLpI8fOvDuHFJ yCMrdNkncBp8vD1Gwja35rTPmPJkAkaUnlArJSIJuh7qwx+D6T1sP0tBwe3qDYy6fApvL8Bc+j4 Y+g32QhK3aC25avUualUm/W4emX+vcklY9MAaJUgKDWtq/hHcN6qG5M9QNAO1XiLrvhpKLfPrX2 gMR+UZ44vM1YF6AJbbCCfuIMF6xLXnN0DN7HnFmHUXAwoIktMLMIbevmURHhrY1l2LHnus5grLA v1jCKrYwG+9G92wy+pRMZUCEHkRt X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.806600-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24964.005 X-MDID: 1570624351-EsA-onoO-zWR Subject: [dpdk-stable] [PATCH v2 3/4] net/virtio: reject unsupported Rx multi queue modes 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Dilshod Urazov This driver supports none of DCB, RSS or VMDQ modes, therefore must check and return error if configured incorrectly. Virtio can distribute Rx packets across multi-queue, but there is no controls (algorithm, redirection table, hash function) except number of Rx queues and ETH_MQ_RX_NONE is the best fit meaning no method is enforced on how to route packets to MQs. Fixes: c1f86306a026 ("virtio: add new driver") Cc: stable@dpdk.org Signed-off-by: Dilshod Urazov Signed-off-by: Andrew Rybchenko --- drivers/net/virtio/virtio_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 7261109dd..0af4fc392 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev) PMD_INIT_LOG(DEBUG, "configure"); req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES; + if (rxmode->mq_mode != ETH_MQ_RX_NONE) { + PMD_DRV_LOG(ERR, + "Unsupported Rx multi queue mode %d", + rxmode->mq_mode); + return -EINVAL; + } + if (dev->data->dev_conf.intr_conf.rxq) { ret = virtio_init_device(dev, hw->req_guest_features); if (ret < 0) -- 2.17.1