From mboxrd@z Thu Jan 1 00:00:00 1970 From: dumitru.ceara@gmail.com Subject: [PATCH] net/i40e: fix setting RSS in i40e_recv_scattered_pkts Date: Tue, 26 Jul 2016 12:46:09 +0200 Message-ID: <1469529969-31925-1-git-send-email-dumitru.ceara@gmail.com> References: <2601191342CEEE43887BDE71AB97725836B82044@irsmsx105.ger.corp.intel.com> Cc: beilei.xing@intel.com, helin.zhang@intel.com, jingjing.wu@intel.com, konstantin.ananyev@intel.com, Dumitru Ceara To: dev@dpdk.org Return-path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id D0F242C01 for ; Tue, 26 Jul 2016 12:46:53 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id i6so13707864pfe.0 for ; Tue, 26 Jul 2016 03:46:53 -0700 (PDT) In-Reply-To: <2601191342CEEE43887BDE71AB97725836B82044@irsmsx105.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Dumitru Ceara The driver is incorrectly setting the RSS field in the last mbuf in the packet chain instead of the first. Moreover, the last mbuf might have already been freed if it only contained the Ethernet CRC. Also, fix the call to i40e_rxd_build_fdir to store the fdir flags in the first mbuf of the chain instead of the last. Signed-off-by: Dumitru Ceara --- drivers/net/i40e/i40e_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index d3cfb98..554d167 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -1436,10 +1436,10 @@ i40e_recv_scattered_pkts(void *rx_queue, i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); if (pkt_flags & PKT_RX_RSS_HASH) - rxm->hash.rss = + first_seg->hash.rss = rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); if (pkt_flags & PKT_RX_FDIR) - pkt_flags |= i40e_rxd_build_fdir(&rxd, rxm); + pkt_flags |= i40e_rxd_build_fdir(&rxd, first_seg); #ifdef RTE_LIBRTE_IEEE1588 pkt_flags |= i40e_get_iee15888_flags(first_seg, qword1); -- 1.9.1