summaryrefslogtreecommitdiff
path: root/drivers/net/failsafe
diff options
context:
space:
mode:
authorIan Dolzhansky <ian.dolzhansky@oktetlabs.ru>2018-08-31 17:09:38 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-09-28 01:41:02 +0200
commit99aa3e0fca0316be3e0b756d735e8b03aa54acde (patch)
treecd54441f7512feb5808bdd2d2bba645f10e7276e /drivers/net/failsafe
parentc942a182921da7d36d217c837e3288fefcf7f70b (diff)
downloaddpdk-next-eventdev-99aa3e0fca0316be3e0b756d735e8b03aa54acde.zip
dpdk-next-eventdev-99aa3e0fca0316be3e0b756d735e8b03aa54acde.tar.gz
dpdk-next-eventdev-99aa3e0fca0316be3e0b756d735e8b03aa54acde.tar.xz
net/failsafe: support runtime Tx queues setup
Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'drivers/net/failsafe')
-rw-r--r--drivers/net/failsafe/failsafe_ops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index a6774f2..7fadf06 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