From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 428595907 for ; Tue, 24 Jun 2014 04:02:33 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 23 Jun 2014 19:02:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,534,1400050800"; d="scan'208";a="552304982" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 23 Jun 2014 19:02:48 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s5O22kYk006798; Tue, 24 Jun 2014 10:02:46 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s5O22gat010538; Tue, 24 Jun 2014 10:02:44 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s5O22gtK010534; Tue, 24 Jun 2014 10:02:42 +0800 From: Helin Zhang To: dev@dpdk.org Date: Tue, 24 Jun 2014 10:02:33 +0800 Message-Id: <1403575359-10422-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1403575359-10422-1-git-send-email-helin.zhang@intel.com> References: <1403575359-10422-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v3 1/7] i40e: fix for getting correct RSS hash result X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2014 02:02:34 -0000 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 --- 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 9fccbee..3a6a2d8 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); -- 1.8.1.4