DPDK patches and discussions
 help / color / mirror / Atom feed
From: Simei Su <simei.su@intel.com>
To: qi.z.zhang@intel.com
Cc: dev@dpdk.org, jia.guo@intel.com, Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice: fix incomplete protocol header for PPPoE
Date: Thu,  9 Jul 2020 14:21:28 +0800	[thread overview]
Message-ID: <1594275688-283889-1-git-send-email-simei.su@intel.com> (raw)

When adding a RSS rule with pattern MAC_PPPOE_IPV4_UDP and input
set SRC/DST IPV4, because of incomplete protocol header fields,
the rule can't do hash with inner src/dst ipv4. PPPOE_IPV4_TCP/SCTP
and PPPOE_IPV6_UDP/TCP/SCTP also have similar issues. This patch
complements protocol header fields for PPPOE data packets.

Fixes: dfaedcf20170 ("net/ice: refactor PF hash flow")

Signed-off-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/ice_hash.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index a10734a..cbd6116 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -113,16 +113,20 @@ struct rss_type_match_hdr hint_eth_ipv4_gtpu_eh_ipv4_tcp = {
 	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP,
 	ETH_RSS_GTPU | ETH_RSS_NONFRAG_IPV4_TCP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv4 = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV4 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_IPV4};
 struct rss_type_match_hdr hint_eth_pppoes_ipv4_udp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV4 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_UDP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv4_tcp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV4 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_TCP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv4_sctp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV4 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV4_SCTP};
 struct rss_type_match_hdr hint_eth_ipv4_esp = {
 	ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV_OTHER |
@@ -218,16 +222,20 @@ struct rss_type_match_hdr hint_eth_vlan_ipv6_sctp = {
 	ETH_RSS_ETH | ETH_RSS_C_VLAN |
 	ETH_RSS_NONFRAG_IPV6_SCTP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv6 = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV6 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_IPV6};
 struct rss_type_match_hdr hint_eth_pppoes_ipv6_udp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV6 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_UDP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_UDP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv6_tcp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV6 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_TCP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_TCP};
 struct rss_type_match_hdr hint_eth_pppoes_ipv6_sctp = {
-	ICE_FLOW_SEG_HDR_PPPOE,
+	ICE_FLOW_SEG_HDR_PPPOE | ICE_FLOW_SEG_HDR_IPV6 |
+	ICE_FLOW_SEG_HDR_IPV_OTHER | ICE_FLOW_SEG_HDR_SCTP,
 	ETH_RSS_ETH | ETH_RSS_PPPOE | ETH_RSS_NONFRAG_IPV6_SCTP};
 struct rss_type_match_hdr hint_eth_pppoes = {
 	ICE_FLOW_SEG_HDR_PPPOE,
-- 
1.8.3.1


             reply	other threads:[~2020-07-09  6:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09  6:21 Simei Su [this message]
2020-07-09 11:22 ` Zhang, Qi Z

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=1594275688-283889-1-git-send-email-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.com \
    --cc=qi.z.zhang@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).