DPDK patches and discussions
 help / color / mirror / Atom feed
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 <dumitru.ceara@gmail.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix setting RSS in i40e_recv_scattered_pkts
Date: Tue, 26 Jul 2016 12:46:09 +0200	[thread overview]
Message-ID: <1469529969-31925-1-git-send-email-dumitru.ceara@gmail.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB97725836B82044@irsmsx105.ger.corp.intel.com>

From: Dumitru Ceara <dumitru.ceara@gmail.com>

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 <dumitru.ceara@gmail.com>
---
 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

  reply	other threads:[~2016-07-26 10:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  9:23 [dpdk-dev] [dpdk-users] RSS Hash not working for XL710/X710 NICs for some RX mbuf sizes Ananyev, Konstantin
2016-07-26 10:46 ` dumitru.ceara [this message]
2016-07-26 12:11   ` [dpdk-dev] [PATCH] net/i40e: fix setting RSS in i40e_recv_scattered_pkts Ananyev, Konstantin
2016-07-28 13:48     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469529969-31925-1-git-send-email-dumitru.ceara@gmail.com \
    --to=dumitru.ceara@gmail.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=konstantin.ananyev@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).