From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 34B215F48 for ; Fri, 31 Aug 2018 18:09:52 +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-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 7E533B40057; Fri, 31 Aug 2018 16:09:49 +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; Fri, 31 Aug 2018 09:09:47 -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; Fri, 31 Aug 2018 09:09:46 -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 w7VG9j7W028079; Fri, 31 Aug 2018 17:09:45 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 3A1A71626D3; Fri, 31 Aug 2018 17:09:45 +0100 (BST) From: Andrew Rybchenko To: Gaetan Rivet CC: , Ian Dolzhansky Date: Fri, 31 Aug 2018 17:09:38 +0100 Message-ID: <1535731778-28288-3-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1535731778-28288-1-git-send-email-arybchenko@solarflare.com> References: <1535731778-28288-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-24064.005 X-TM-AS-Result: No-3.584800-4.000000-10 X-TMASE-MatchedRID: dVrIcuBkTo3Ot+/gOYaZxQPZZctd3P4BE9UcwzMfVZjRLEyE6G4DRAhc jLBsc2uYlTrfppylHpBLArWPJqBt4kIjaJSsaV6quIwLnB3Aqp22McZY43zJ4wqiCYa6w8tvIub j9bOa7MsRORl1ns6WoSf1ax0zxEV0RlRZprugM0F1e7Xbb6Im2pYcYQ11P5U/myiLZetSf8mfop 0ytGwvXiq2rl3dzGQ1G44jftiAwPxbk6aLFqlFpvqV10nBBskc8q1C0PsBL+9t67wB2jO7U4n6S nJoeAKa7wBAubT3xLYI7VoqQryaY4cbQOxsKG/kMfWLN2CnIHw4oGQUCbwY5Q+g7mdwjo656FtD ZCmYBJ3KTLw/lNgw8g== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.584800-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24064.005 X-MDID: 1535731790-v6sfxerIoyTU Subject: [dpdk-dev] [PATCH 2/2] net/failsafe: support runtime Tx queues setup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2018 16:09:52 -0000 From: Ian Dolzhansky Signed-off-by: Ian Dolzhansky Signed-off-by: Andrew Rybchenko --- doc/guides/nics/features/failsafe.ini | 1 + doc/guides/rel_notes/release_18_11.rst | 2 +- drivers/net/failsafe/failsafe_ops.c | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini index 8bb2cac4c..e3c4c08f2 100644 --- a/doc/guides/nics/features/failsafe.ini +++ b/doc/guides/nics/features/failsafe.ini @@ -9,6 +9,7 @@ Link status event = Y Rx interrupt = Y Queue start/stop = Y Runtime Rx queue setup = Y +Runtime Tx queue setup = Y MTU update = Y Jumbo frame = Y Promiscuous mode = Y diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst index 85561dacd..5d69c95b1 100644 --- a/doc/guides/rel_notes/release_18_11.rst +++ b/doc/guides/rel_notes/release_18_11.rst @@ -60,7 +60,7 @@ New Features * Support for Rx and Tx queues start and stop. * Support for Rx and Tx queues deferred start. - * Support for runtime Rx queues setup. + * Support for runtime Rx and Tx queues setup. * **Added ability to switch queue deferred start flag on testpmd app.** diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 5374d0597..809f9d5ff 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -89,7 +89,8 @@ static struct rte_eth_dev_info default_infos = { ETH_RSS_UDP | ETH_RSS_TCP, .dev_capa = - RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP, + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP, }; static int @@ -187,7 +188,7 @@ fs_set_queues_state_start(struct rte_eth_dev *dev) } for (i = 0; i < dev->data->nb_tx_queues; i++) { txq = dev->data->tx_queues[i]; - if (!txq->info.conf.tx_deferred_start) + if (txq != NULL && !txq->info.conf.tx_deferred_start) dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; } @@ -246,7 +247,9 @@ fs_set_queues_state_stop(struct rte_eth_dev *dev) dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; for (i = 0; i < dev->data->nb_tx_queues; i++) - dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; + if (dev->data->tx_queues[i] != NULL) + dev->data->tx_queue_state[i] = + RTE_ETH_QUEUE_STATE_STOPPED; } static void -- 2.17.1