From: Helin Zhang Date: Tue, 24 Jun 2014 02:02:33 +0000 (+0800) Subject: i40e: fix RSS hash copy X-Git-Tag: spdx-start~10607 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d025265b7e652f9165cb509e23f380ed896721b1;p=dpdk.git i40e: fix RSS hash copy 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 Acked-by: Jing Chen Acked-by: Cunming Liang --- diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c index 9fccbee0fe..3a6a2d8106 100644 --- a/lib/librte_pmd_i40e/i40e_rxtx.c +++ b/lib/librte_pmd_i40e/i40e_rxtx.c @@ -863,7 +863,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; } @@ -1016,7 +1016,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);