Skip to contentSkip to conversation

i40e: bug fix of querying reta

PATCH Superseded Helin Zhang 2 participants 3 messages Dec 9, 2014 – Dec 11, 2014 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e: bug fix of querying reta

There is a bug in querying reta, of storing the data to the correct entry. Code changes is straightforward for this bug.

---
 lib/librte_pmd_i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_i40e/i40e_ethdev.c +1 -1
index 899cb42..008d62c 100644
@@ -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);
 		}
 	}
Signature · 1 line
1.9.3
#2 lore raw

PATCH v2 1/1 i40e: bug fix of querying reta

In reply to a message not in the archive

There is a bug in querying reta, of storing the data to the correct entry. Code changes is straightforward for this bug.

---
 lib/librte_pmd_i40e/i40e_ethdev.c    | 2 +-
 lib/librte_pmd_i40e/i40e_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

v2 changes:
* Added the fix for the same issue in i40e VF driver.

lib/librte_pmd_i40e/i40e_ethdev.c +1 -1
index 899cb42..008d62c 100644
@@ -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);
 		}
 	}
lib/librte_pmd_i40e/i40e_ethdev_vf.c +1 -1
index 7ef7d58..fe46cf1 100644
@@ -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);
 		}
Signature · 1 line
1.9.3
#4 lore raw
In reply to a message not in the archive
Quoted 11 lines

There is a bug in querying reta, of storing the data to the correct entry. Code changes is straightforward for this bug.

---
 lib/librte_pmd_i40e/i40e_ethdev.c    | 2 +-
 lib/librte_pmd_i40e/i40e_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

v2 changes:
* Added the fix for the same issue in i40e VF driver.

Applied

Thanks

Signature · 1 line
Thomas