DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Gaetan Rivet <gaetan.rivet@6wind.com>
Cc: <dev@dpdk.org>, Ian Dolzhansky <Ian.Dolzhansky@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH 2/2] net/failsafe: support runtime Tx queues setup
Date: Fri, 31 Aug 2018 17:09:38 +0100	[thread overview]
Message-ID: <1535731778-28288-3-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1535731778-28288-1-git-send-email-arybchenko@solarflare.com>

From: Ian Dolzhansky <Ian.Dolzhansky@oktetlabs.ru>

Signed-off-by: Ian Dolzhansky <Ian.Dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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

  parent reply	other threads:[~2018-08-31 16:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 16:09 [dpdk-dev] [PATCH 0/2] net/failsafe: support runtime queue setup Andrew Rybchenko
2018-08-31 16:09 ` [dpdk-dev] [PATCH 1/2] net/failsafe: support runtime Rx queues setup Andrew Rybchenko
2018-08-31 16:09 ` Andrew Rybchenko [this message]
2018-09-19 15:02 ` [dpdk-dev] [PATCH 0/2] net/failsafe: support runtime queue setup Gaëtan Rivet
2018-09-21  0:29   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535731778-28288-3-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=Ian.Dolzhansky@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).