From: Ian Dolzhansky Date: Fri, 31 Aug 2018 16:09:38 +0000 (+0100) Subject: net/failsafe: support runtime Tx queues setup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=99aa3e0fca0316be3e0b756d735e8b03aa54acde;p=dpdk.git net/failsafe: support runtime Tx queues setup Signed-off-by: Ian Dolzhansky Signed-off-by: Andrew Rybchenko --- diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini index 8bb2cac4ca..e3c4c08f22 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 f1b78cd26b..1581c2b5a4 100644 --- a/doc/guides/rel_notes/release_18_11.rst +++ b/doc/guides/rel_notes/release_18_11.rst @@ -78,7 +78,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 a6774f27f1..7fadf06f5b 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -87,7 +87,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 @@ -185,7 +186,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; } @@ -244,7 +245,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