summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxime Leroy <maxime.leroy@6wind.com>2013-09-02 17:14:10 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-01-15 18:11:18 +0100
commit9f7493544637e1d82efad2880d3ddde879d173d0 (patch)
treef1762e95239dc9ec35f596214d9344e1d819024f /lib
parent1035e8bd10a656f623475ad30e7e3d088f780fe1 (diff)
downloaddpdk-9f7493544637e1d82efad2880d3ddde879d173d0.zip
dpdk-9f7493544637e1d82efad2880d3ddde879d173d0.tar.gz
dpdk-9f7493544637e1d82efad2880d3ddde879d173d0.tar.xz
igb/ixgbe: allow RSS with only one Rx queue
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_pmd_e1000/igb_rxtx.c7
-rw-r--r--lib/librte_pmd_ixgbe/ixgbe_rxtx.c7
2 files changed, 4 insertions, 10 deletions
diff --git a/lib/librte_pmd_e1000/igb_rxtx.c b/lib/librte_pmd_e1000/igb_rxtx.c
index 6b09339..68716b0 100644
--- a/lib/librte_pmd_e1000/igb_rxtx.c
+++ b/lib/librte_pmd_e1000/igb_rxtx.c
@@ -1745,8 +1745,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;
@@ -1759,9 +1758,7 @@ igb_dev_mq_rx_configure(struct rte_eth_dev *dev)
default:
igb_rss_disable(dev);
break;
- }
- else
- igb_rss_disable(dev);
+ }
}
return 0;
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index cabecdd..6e22257 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -3215,8 +3215,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;
@@ -3232,9 +3231,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) {
/*