summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelin Zhang <helin.zhang@intel.com>2014-12-10 11:10:16 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-12-11 01:42:03 +0100
commit0b04f881a8092c5cd9e60179c6136fc383f8b082 (patch)
tree7d1d4408859c1f3d0faed2ab501fdded177e4de5
parent77f127bcda2e473d5f544e964690bfee99ad1125 (diff)
downloaddpdk-0b04f881a8092c5cd9e60179c6136fc383f8b082.zip
dpdk-0b04f881a8092c5cd9e60179c6136fc383f8b082.tar.gz
dpdk-0b04f881a8092c5cd9e60179c6136fc383f8b082.tar.xz
i40e: fix RSS RETA query
There is a bug in querying reta, of storing the data to the correct entry. Signed-off-by: Helin Zhang <helin.zhang@intel.com>
-rw-r--r--lib/librte_pmd_i40e/i40e_ethdev.c2
-rw-r--r--lib/librte_pmd_i40e/i40e_ethdev_vf.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 899cb42..008d62c 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -1924,7 +1924,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev *dev,
lut = I40E_READ_REG(hw, I40E_PFQF_HLUT(i >> 2));
for (j = 0; j < I40E_4_BIT_WIDTH; j++) {
if (mask & (0x1 << j))
- reta_conf[idx].reta[shift] = ((lut >>
+ reta_conf[idx].reta[shift + j] = ((lut >>
(CHAR_BIT * j)) & I40E_8_BIT_MASK);
}
}
diff --git a/lib/librte_pmd_i40e/i40e_ethdev_vf.c b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
index 7ef7d58..fe46cf1 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev_vf.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev_vf.c
@@ -1760,7 +1760,7 @@ i40evf_dev_rss_reta_query(struct rte_eth_dev *dev,
lut = I40E_READ_REG(hw, I40E_VFQF_HLUT(i >> 2));
for (j = 0; j < I40E_4_BIT_WIDTH; j++) {
if (mask & (0x1 << j))
- reta_conf[idx].reta[shift] =
+ reta_conf[idx].reta[shift + j] =
((lut >> (CHAR_BIT * j)) &
I40E_8_BIT_MASK);
}