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, wei.zhao1@intel.com, junyux.jiang@intel.com,
	nannan.lu@intel.com, Simei Su <simei.su@intel.com>
Subject: [dpdk-dev] [PATCH] net/ice: fix GTPU/PPPoE packets with no hash value
Date: Tue,  7 Jul 2020 09:38:18 +0800	[thread overview]
Message-ID: <1594085898-138749-1-git-send-email-simei.su@intel.com> (raw)

When RSS init, because of profile overlap, the GTPU_IPV4 packets
don't hit GTPU_INNER_IPV4 profile which causes no hash value. Because
of no PPPoE profile, the PPPoE packets also has no hash value. This
patch solves this issue by pulling GTPU_IPV4 profile into inner ipv4
group and creating related PPPoE profile at the same time.

Fixes: 8cadc41294c6 ("net/ice: initialize and update RSS based on user config")

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

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 0af9405..85b9eb4 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2533,6 +2533,86 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 			PMD_DRV_LOG(ERR, "%s SCTP_IPV6 rss flow fail %d",
 				    __func__, ret);
 	}
+
+	if (rss_hf & ETH_RSS_IPV4) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV4 rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV4 rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_IPV6) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV6 rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV6 rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_UDP rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_UDP rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_TCP rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_TCP rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) {
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV4,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV4_SCTP rss flow fail %d",
+				    __func__, ret);
+	}
+
+	if (rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) {
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV6_SCTP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV6,
+				ICE_FLOW_SEG_HDR_PPPOE, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s PPPoE_IPV6_SCTP rss flow fail %d",
+				    __func__, ret);
+	}
 }
 
 static int ice_init_rss(struct ice_pf *pf)
-- 
1.8.3.1


             reply	other threads:[~2020-07-07  1:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  1:38 Simei Su [this message]
2020-07-07  2:29 ` Zhang, Qi Z
2020-07-07  3:09   ` 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=1594085898-138749-1-git-send-email-simei.su@intel.com \
    --to=simei.su@intel.com \
    --cc=dev@dpdk.org \
    --cc=junyux.jiang@intel.com \
    --cc=nannan.lu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=wei.zhao1@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).