From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 71675B0AB for ; Fri, 20 Jun 2014 08:14:44 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 19 Jun 2014 23:15:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,512,1400050800"; d="scan'208";a="447831282" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by azsmga001.ch.intel.com with ESMTP; 19 Jun 2014 23:14:59 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s5K6EvdW018777; Fri, 20 Jun 2014 14:14:57 +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 s5K6ErZc022921; Fri, 20 Jun 2014 14:14:55 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s5K6ErRr022893; Fri, 20 Jun 2014 14:14:53 +0800 From: Helin Zhang To: dev@dpdk.org Date: Fri, 20 Jun 2014 14:14:43 +0800 Message-Id: <1403244889-21358-2-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> References: <1403244889-21358-1-git-send-email-helin.zhang@intel.com> Subject: [dpdk-dev] [PATCH 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: Fri, 20 Jun 2014 06:14:44 -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: Cunming Liang Acked-by: Jing Chen --- 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