From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2R0bUJCIgdwny21zOWJ6qHQfKJSTGtLERnX7yWmvd3k=; b=LzJ/oPxbSxIyhZaMSLWfVlmoqFXsG/4N0REPRj9pNUd4XG4a91Yfj9E02sWFZGQOgn p6pgDajWRM2jyxwQi6JzwysCTrCrtTZR0dxUIzrzdjBpI80Mwx0o869hV4pYG9jRHAep WFKivYcqClhN4sCFtDNSPhLO9crh2d0F8Brjyc32y/ETWnx4EH7zwW9dKVD2mmBW8h5f TEvmdDV1evIoGU/dt1TGllzvQCTiuVWtNtzUcl8TbT1dnLHWE0RYRQtVmjQWLs5JIrw6 kTMXbPjHF9c/GITRQSHAhVUWrxnrRzr5DgtgVYyWfYM7j4r/5c3CzCl6xhsUfZ4jUCa9 hApg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2R0bUJCIgdwny21zOWJ6qHQfKJSTGtLERnX7yWmvd3k=; b=JStmeZX+O7OUMKE2fh48ooxtbbXwqmY5VFtj7Tqd434MuawDlqa2BtteAmUl0Tglpj bHGdyN3H2bC6TN4AIRZ8wi4elS8ClRAoSuD6bx9xTngNe7Ut+Af+hZiwFIhXLTp4JSel SPxVosZx4foPwUHNtDAMUrgSsJZpyqTKtKgNLxTNbXFnq/sKv+oGlvGCk2WK9MviFnlV Czsd95IBcjEzN8+faPkHi2Xx6ShArQwqd6VwQIAKuEMQNCiJ7jiEcGSmzdgf1Em172FZ plYxwCOESM3SkSV12G5euoLxBaIR9136ty/YdjxmeJnd2wT+ZzVUI+xR1wTE1Jb+4X27 nP8g== X-Gm-Message-State: AEkoouvfcJUg5/n9Ca3XlL/ErNxXZr8Xvje8qwwpdDKREy/7j4D3IIDjRSGaK1Jt03966Q== X-Received: by 10.98.62.144 with SMTP id y16mr38613791pfj.9.1469530013136; Tue, 26 Jul 2016 03:46:53 -0700 (PDT) Received: from dceara-lnx.jnpr.net (jplon-nat14.juniper.net. [193.110.55.14]) by smtp.gmail.com with ESMTPSA id b7sm450048pat.27.2016.07.26.03.46.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jul 2016 03:46:52 -0700 (PDT) From: dumitru.ceara@gmail.com To: dev@dpdk.org Cc: beilei.xing@intel.com, helin.zhang@intel.com, jingjing.wu@intel.com, konstantin.ananyev@intel.com, Dumitru Ceara Date: Tue, 26 Jul 2016 12:46:09 +0200 Message-Id: <1469529969-31925-1-git-send-email-dumitru.ceara@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <2601191342CEEE43887BDE71AB97725836B82044@irsmsx105.ger.corp.intel.com> References: <2601191342CEEE43887BDE71AB97725836B82044@irsmsx105.ger.corp.intel.com> Subject: [dpdk-dev] [PATCH] net/i40e: fix setting RSS in i40e_recv_scattered_pkts 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, 26 Jul 2016 10:46:54 -0000 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