From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C75D2AFD4 for ; Mon, 23 Jun 2014 14:57:23 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 Jun 2014 05:57:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,530,1400050800"; d="scan'208";a="532670307" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 23 Jun 2014 05:57:19 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s5NCvHsW030268; Mon, 23 Jun 2014 20:57:17 +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 s5NCvEXO004217; Mon, 23 Jun 2014 20:57:16 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s5NCvEpD004213; Mon, 23 Jun 2014 20:57:14 +0800 From: Helin Zhang To: dev@dpdk.org Date: Mon, 23 Jun 2014 20:57:05 +0800 Message-Id: <1403528231-4099-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1403528231-4099-1-git-send-email-helin.zhang@intel.com> References: <1403528231-4099-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH v2 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: Mon, 23 Jun 2014 12:57:24 -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