[dpdk-dev] [PATCH 1/7] i40e: fix for getting correct RSS hash result

Helin Zhang helin.zhang at intel.com
Fri Jun 20 08:14:43 CEST 2014


It wrongly gets the RSS hash result from the RX descriptor which
has been modified for receiving new packet. The fix is to get the
RSS hash result from the buffer which saves the RX descriptor.

Signed-off-by: Helin Zhang <helin.zhang at intel.com>
Acked-by: Cunming Liang <cunming.liang at intel.com>
Acked-by: Jing Chen <jing.d.chen at intel.com>
---
 lib/librte_pmd_i40e/i40e_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index d802894..22f55b9 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -864,7 +864,7 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		rxm->ol_flags = pkt_flags;
 		if (pkt_flags & PKT_RX_RSS_HASH)
 			rxm->pkt.hash.rss =
-				rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.rss);
+				rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss);
 
 		rx_pkts[nb_rx++] = rxm;
 	}
@@ -1017,7 +1017,7 @@ i40e_recv_scattered_pkts(void *rx_queue,
 		first_seg->ol_flags = pkt_flags;
 		if (pkt_flags & PKT_RX_RSS_HASH)
 			rxm->pkt.hash.rss =
-				rte_le_to_cpu_32(rxdp->wb.qword0.hi_dword.rss);
+				rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss);
 
 		/* Prefetch data of first segment, if configured to do so. */
 		rte_prefetch0(first_seg->pkt.data);
-- 
1.8.1.4



More information about the dev mailing list