DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhe Tao <zhe.tao@intel.com>
To: dev@dpdk.org
Cc: zhe.tao@intel.com, jingjing.wu@intel.com
Subject: [dpdk-dev] [PATCH v3] i40e: fix olflags for vector Rx
Date: Tue, 14 Jun 2016 13:24:16 +0800	[thread overview]
Message-ID: <1465881856-8248-1-git-send-email-zhe.tao@intel.com> (raw)
In-Reply-To: <1465787275-13776-1-git-send-email-zhe.tao@intel.com>

Problem:
The flag for RSS and flow director is not set correctly in the
vector Rx function, so the upper layer APP which base on the related
flags will not work correctly.

Fix this problem by change the shuffle table. the original shuffle
table is not correct.

Fixes: 9ed94e5bb04e ("i40e: add vector Rx")

Signed-off-by: Zhe Tao <zhe.tao@intel.com>
---
v2: Changed the comments according to the code change.
v3: Fixed the issues reported by check-git-log.sh.

 drivers/net/i40e/i40e_rxtx_vec.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec.c b/drivers/net/i40e/i40e_rxtx_vec.c
index eef80d9..704924f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec.c
@@ -144,12 +144,13 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 		uint64_t dword;
 	} vol;
 
-	/* mask everything except rss and vlan flags
-	*bit2 is for vlan tag, bits 13:12 for rss
-	*/
+	/* mask everything except RSS, flow director and VLAN flags
+	 * bit2 is for VLAN tag, bit11 for flow director indication
+	 * bit13:12 for RSS indication.
+	 */
 	const __m128i rss_vlan_msk = _mm_set_epi16(
 			0x0000, 0x0000, 0x0000, 0x0000,
-			0x3004, 0x3004, 0x3004, 0x3004);
+			0x3804, 0x3804, 0x3804, 0x3804);
 
 	/* map rss and vlan type to rss hash and vlan flag */
 	const __m128i vlan_flags = _mm_set_epi8(0, 0, 0, 0,
@@ -159,8 +160,8 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 
 	const __m128i rss_flags = _mm_set_epi8(0, 0, 0, 0,
 			0, 0, 0, 0,
-			0, 0, 0, 0,
-			PKT_RX_FDIR, 0, PKT_RX_RSS_HASH, 0);
+			PKT_RX_RSS_HASH | PKT_RX_FDIR, PKT_RX_RSS_HASH, 0, 0,
+			0, 0, PKT_RX_FDIR, 0);
 
 	vlan0 = _mm_unpackhi_epi16(descs[0], descs[1]);
 	vlan1 = _mm_unpackhi_epi16(descs[2], descs[3]);
@@ -169,7 +170,7 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 	vlan1 = _mm_and_si128(vlan0, rss_vlan_msk);
 	vlan0 = _mm_shuffle_epi8(vlan_flags, vlan1);
 
-	rss = _mm_srli_epi16(vlan1, 12);
+	rss = _mm_srli_epi16(vlan1, 11);
 	rss = _mm_shuffle_epi8(rss_flags, rss);
 
 	vlan0 = _mm_or_si128(vlan0, rss);
-- 
2.1.4

  parent reply	other threads:[~2016-06-14  5:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 12:55 [dpdk-dev] [PATCH v1] i40e: fix olflags for vector RX Zhe Tao
2016-06-03  7:19 ` Azarewicz, PiotrX T
2016-06-09 15:41   ` Bruce Richardson
2016-06-13  3:07 ` [dpdk-dev] [PATCH v2] " Zhe Tao
2016-06-13  7:57   ` Azarewicz, PiotrX T
2016-06-14  5:24   ` Zhe Tao [this message]
2016-06-14  8:43     ` [dpdk-dev] [PATCH v3] i40e: fix olflags for vector Rx Azarewicz, PiotrX T
2016-06-15  8:35     ` Wu, Jingjing
2016-06-23 11:07       ` Bruce Richardson
2016-06-21  5:28     ` Peng, Yuan

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=1465881856-8248-1-git-send-email-zhe.tao@intel.com \
    --to=zhe.tao@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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).