DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix issue for GTPU and GTPU extension packet
@ 2020-07-17  3:27 Simei Su
  2020-07-18  3:59 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Simei Su @ 2020-07-17  3:27 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, jia.guo, Simei Su

Because of incomplete protocol header fields, GTPU_INNER_IPV4_UDP
and GTPU_INNER_IPV4_TCP profile aren't included in inner ipv4 group.
This patch complements header fields for GTPU/GTPU_EH ipv4 rss config.

Besides, after configuring L4 port, GTPU and GTPU_EH packets don't do
hash for UDP/TCP/SCTP. This patch also enables L4 hash for GTPU and GTPU
extension packets.

Fixes: d117de460035 ("net/ice: fix GTPU/PPPoE packets with no hash value")

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

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3534d18..7dd3fcd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2524,13 +2524,25 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	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);
+				ICE_FLOW_SEG_HDR_GTPU_IP |
+				ICE_FLOW_SEG_HDR_IPV4 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 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);
+				ICE_FLOW_SEG_HDR_GTPU_EH |
+				ICE_FLOW_SEG_HDR_IPV4 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV4 rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,
+				ICE_FLOW_SEG_HDR_PPPOE |
+				ICE_FLOW_SEG_HDR_IPV4 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 0);
 		if (ret)
 			PMD_DRV_LOG(ERR, "%s PPPoE_IPV4 rss flow fail %d",
 				    __func__, ret);
@@ -2538,13 +2550,25 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	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);
+				ICE_FLOW_SEG_HDR_GTPU_IP |
+				ICE_FLOW_SEG_HDR_IPV6 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 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);
+				ICE_FLOW_SEG_HDR_GTPU_EH |
+				ICE_FLOW_SEG_HDR_IPV6 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV6 rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,
+				ICE_FLOW_SEG_HDR_PPPOE |
+				ICE_FLOW_SEG_HDR_IPV6 |
+				ICE_FLOW_SEG_HDR_IPV_OTHER, 0);
 		if (ret)
 			PMD_DRV_LOG(ERR, "%s PPPoE_IPV6 rss flow fail %d",
 				    __func__, ret);
@@ -2552,6 +2576,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV4_UDP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV4_UDP rss flow fail %d",
+				    __func__, ret);
+
+		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",
@@ -2560,6 +2596,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV6_UDP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV6_UDP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV6_UDP rss flow fail %d",
+				    __func__, ret);
+
+		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",
@@ -2568,6 +2616,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV4_TCP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV4_TCP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV4_TCP rss flow fail %d",
+				    __func__, ret);
+
+		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",
@@ -2576,6 +2636,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV6_TCP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV6_TCP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV6_TCP rss flow fail %d",
+				    __func__, ret);
+
+		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",
@@ -2584,6 +2656,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV4_SCTP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_IPV4_SCTP rss flow fail %d",
+				    __func__, ret);
+
+		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV4,
+				ICE_FLOW_SEG_HDR_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_IPV4_SCTP rss flow fail %d",
+				    __func__, ret);
+
+		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",
@@ -2592,6 +2676,18 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)
 
 	if (rss_hf & ETH_RSS_NONFRAG_IPV6_SCTP) {
 		ret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_SCTP_IPV6,
+				ICE_FLOW_SEG_HDR_GTPU_IP, 0);
+		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_GTPU_EH, 0);
+		if (ret)
+			PMD_DRV_LOG(ERR, "%s GTPU_EH_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",
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ice: fix issue for GTPU and GTPU extension packet
  2020-07-17  3:27 [dpdk-dev] [PATCH] net/ice: fix issue for GTPU and GTPU extension packet Simei Su
@ 2020-07-18  3:59 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-07-18  3:59 UTC (permalink / raw)
  To: Su, Simei; +Cc: dev, Guo, Jia



> -----Original Message-----
> From: Su, Simei <simei.su@intel.com>
> Sent: Friday, July 17, 2020 11:28 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; Su, Simei
> <simei.su@intel.com>
> Subject: [PATCH] net/ice: fix issue for GTPU and GTPU extension packet
> 
> Because of incomplete protocol header fields, GTPU_INNER_IPV4_UDP and
> GTPU_INNER_IPV4_TCP profile aren't included in inner ipv4 group.
> This patch complements header fields for GTPU/GTPU_EH ipv4 rss config.
> 
> Besides, after configuring L4 port, GTPU and GTPU_EH packets don't do hash
> for UDP/TCP/SCTP. This patch also enables L4 hash for GTPU and GTPU
> extension packets.
> 
> Fixes: d117de460035 ("net/ice: fix GTPU/PPPoE packets with no hash value")
> 
> Signed-off-by: Simei Su <simei.su@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-18  3:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  3:27 [dpdk-dev] [PATCH] net/ice: fix issue for GTPU and GTPU extension packet Simei Su
2020-07-18  3:59 ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git