igb/ixgbe: allow RSS with only one Rx queue
authorMaxime Leroy <maxime.leroy@6wind.com>
Mon, 2 Sep 2013 15:14:10 +0000 (17:14 +0200)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 09:22:32 +0000 (10:22 +0100)
It should be possible to enable RSS with one Rx queue.
RSS hash can be useful independently of the number of Rx queues.
Applications can use RSS hash to identify different IP flows.

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
lib/librte_pmd_e1000/igb_rxtx.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.c

index 7e7bd4b..cb3b10a 100644 (file)
@@ -1753,8 +1753,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
                /*
                * SRIOV inactive scheme
                */
-               if (dev->data->nb_rx_queues > 1)
-                       switch (dev->data->dev_conf.rxmode.mq_mode) {
+               switch (dev->data->dev_conf.rxmode.mq_mode) {
                        case ETH_MQ_RX_RSS:
                                igb_rss_configure(dev);
                                break;
@@ -1767,9 +1766,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
                        default: 
                                igb_rss_disable(dev);
                                break;
-                       }
-               else
-                       igb_rss_disable(dev);
+               }
        }
  
        return 0;
index b63aefe..7415ddc 100644 (file)
@@ -3226,8 +3226,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
                 * SRIOV inactive scheme
                 * any DCB/RSS w/o VMDq multi-queue setting
                 */
-               if (dev->data->nb_rx_queues > 1)
-                       switch (dev->data->dev_conf.rxmode.mq_mode) {
+               switch (dev->data->dev_conf.rxmode.mq_mode) {
                        case ETH_MQ_RX_RSS:
                                ixgbe_rss_configure(dev);
                                break;
@@ -3243,9 +3242,7 @@ ixgbe_dev_mq_rx_configure(struct rte_eth_dev *dev)
                        case ETH_MQ_RX_NONE:
                                /* if mq_mode is none, disable rss mode.*/
                        default: ixgbe_rss_disable(dev);
-                       }
-               else
-                       ixgbe_rss_disable(dev);
+               }
        } else {
                switch (RTE_ETH_DEV_SRIOV(dev).active) {
                /*