net/failsafe: add checks for deferred queue setup
authorIan Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Thu, 20 Sep 2018 13:55:50 +0000 (14:55 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org
Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
drivers/net/failsafe/failsafe_ops.c

index 49b1550..9110521 100644 (file)
@@ -342,6 +342,11 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
        uint8_t i;
        int ret;
 
+       if (rx_conf->rx_deferred_start) {
+               ERROR("Rx queue deferred start is not supported");
+               return -EINVAL;
+       }
+
        fs_lock(dev, 0);
        rxq = dev->data->rx_queues[rx_queue_id];
        if (rxq != NULL) {
@@ -503,6 +508,11 @@ fs_tx_queue_setup(struct rte_eth_dev *dev,
        uint8_t i;
        int ret;
 
+       if (tx_conf->tx_deferred_start) {
+               ERROR("Tx queue deferred start is not supported");
+               return -EINVAL;
+       }
+
        fs_lock(dev, 0);
        txq = dev->data->tx_queues[tx_queue_id];
        if (txq != NULL) {