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 2D13B5F2E 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 B1374B40057; 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:46 -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 w7VG9jhb028072; 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 3116A1626D2; 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:37 +0100 Message-ID: <1535731778-28288-2-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-1.444900-4.000000-10 X-TMASE-MatchedRID: 8hqU3tU3q+CAiWRjG7Ut6R+WEMjoO9WWTJDl9FKHbrkYSjzp7efq+r6Y VRYkPkYC7lGe7/57bl8VmqZXmnc/Uhm45uWXWpVB7spMO3HwKCDDHSNFHFxB820eIjMMK3Pp81o 1+gWZiThMmm8bxtFZ3cfr4HrQmLildWSASb0lZx1/OBWacv+iVe3+iQEtoSj4EvoxTu3fj1tt31 nTPUZUNtp9a0LxKCm8gnq2nFD88n6PaFHMfVTC4BRFJJyf5BJerSFs54Y4wbX6C0ePs7A07Rf2u kFm4ENtOC0zMc03QTs42WJ0/M0Frs6Oh+jgzTiD5xknrYrnGHi+Qq45Ks+9rnfgFX+MNA89G2CT FjzNc6etFqtU0iIXMxAKtHFGNW/22kC7SwvGlKhDwb7Jglhh1lFkOwaJdCKgGObbx/Uctjc= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--1.444900-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24064.005 X-MDID: 1535731790-aJJfAZ_F3HLe Subject: [dpdk-dev] [PATCH 1/2] net/failsafe: support runtime Rx 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 | 1 + drivers/net/failsafe/failsafe_intr.c | 2 +- drivers/net/failsafe/failsafe_ops.c | 8 ++++++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini index 74eae4a62..8bb2cac4c 100644 --- a/doc/guides/nics/features/failsafe.ini +++ b/doc/guides/nics/features/failsafe.ini @@ -8,6 +8,7 @@ Link status = Y Link status event = Y Rx interrupt = Y Queue start/stop = Y +Runtime Rx 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 ad08a204f..85561dacd 100644 --- a/doc/guides/rel_notes/release_18_11.rst +++ b/doc/guides/rel_notes/release_18_11.rst @@ -60,6 +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. * **Added ability to switch queue deferred start flag on testpmd app.** diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c index fc6ec37fc..1c2cb71c4 100644 --- a/drivers/net/failsafe/failsafe_intr.c +++ b/drivers/net/failsafe/failsafe_intr.c @@ -372,7 +372,7 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev) for (qid = 0; qid < ETH(sdev)->data->nb_rx_queues; qid++) { if (qid < fsdev->data->nb_rx_queues) { fsrxq = fsdev->data->rx_queues[qid]; - if (fsrxq->enable_events) + if (fsrxq != NULL && fsrxq->enable_events) rte_eth_dev_rx_intr_disable(PORT_ID(sdev), qid); } diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index b2a5fe4d9..5374d0597 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -88,6 +88,8 @@ static struct rte_eth_dev_info default_infos = { ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP, + .dev_capa = + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP, }; static int @@ -179,7 +181,7 @@ fs_set_queues_state_start(struct rte_eth_dev *dev) for (i = 0; i < dev->data->nb_rx_queues; i++) { rxq = dev->data->rx_queues[i]; - if (!rxq->info.conf.rx_deferred_start) + if (rxq != NULL && !rxq->info.conf.rx_deferred_start) dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED; } @@ -240,7 +242,9 @@ fs_set_queues_state_stop(struct rte_eth_dev *dev) uint16_t i; for (i = 0; i < dev->data->nb_rx_queues; i++) - dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; + if (dev->data->rx_queues[i] != NULL) + 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; } -- 2.17.1