Skip to contentSkip to conversation

net/ice: fix tunnel type get error

PATCH Superseded Wei Zhao 3 participants 6 messages Jul 15, 2020 – Jul 16, 2020 Network drivers

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 net/ice: fix tunnel type get error

When get tunnel type for ICE_NON_TUN, there need some upodate for gtp related pctype.

Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")
---
 drivers/net/ice/base/ice_switch.c | 4 ++--
 drivers/net/ice/base/ice_switch.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ice/base/ice_switch.c +2 -2
index 296aa5484..ebf405f7a 100644
@@ -1069,7 +1069,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
 				non_tun_valid = true;
 		}
 
-		if (j >= ICE_PROFID_IPV4_GTPC_TEID &&
+		if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER &&
 		    j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER)
 			gtp_valid = true;
 
@@ -1136,7 +1136,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
 					tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_UDP:
-					tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP;
+					tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_OTHER:
 					tun_type = ICE_SW_TUN_PPPOE_IPV6;
drivers/net/ice/base/ice_switch.h +1 -0
index cc3d2702e..77c70d3b2 100644
@@ -28,6 +28,7 @@
 #define ICE_PROFID_PPPOE_IPV6_UDP	39
 #define ICE_PROFID_PPPOE_IPV6_OTHER	40
 #define ICE_PROFID_IPV4_GTPC_TEID	41
+#define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER	47
 #define ICE_PROFID_IPV6_GTPU_IPV6_OTHER	70
 #define ICE_PROFID_IPV4_ESP		71
 #define ICE_PROFID_IPV6_ESP		72
Signature · 1 line
2.19.1
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Wednesday, July 15, 2020 10:08 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Nannan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ice: fix tunnel type get error

When get tunnel type for ICE_NON_TUN, there need some upodate for gtp related pctype.

Quoted 8 lines
Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")

---
drivers/net/ice/base/ice_switch.c | 4 ++-- drivers/net/ice/base/ice_switch.h |
1 +

 2 files changed, 3 insertions(+), 2 deletions(-)
Quoted 2 lines

--
2.19.1

#2 lore raw
In reply to Wei Zhao
Quoted 10 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Wednesday, July 15, 2020 10:08 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Nannan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ice: fix tunnel type get error

Quoted 2 lines

When get tunnel type for ICE_NON_TUN, there need some upodate for gtp related pctype.

please reword the commit log, what do you mean "get tunnel type for ICE_NON_TUN"? also we don't have pctype in ice, please use profile.

Quoted 49 lines
Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")

---
drivers/net/ice/base/ice_switch.c | 4 ++-- drivers/net/ice/base/ice_switch.h
| 1 +

 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ice/base/ice_switch.c +2 -2
index 296aa5484..ebf405f7a 100644
@@ -1069,7 +1069,7 @@ static enum ice_sw_tunnel_type
 ice_get_tun_type_for_recipe(u8 rid)
 				non_tun_valid = true;
 		}
 
-		if (j >= ICE_PROFID_IPV4_GTPC_TEID &&
+		if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER &&
 		    j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER)
 			gtp_valid = true;
@@ -1136,7 +1136,7 @@ static enum ice_sw_tunnel_type
 ice_get_tun_type_for_recipe(u8 rid)
 					tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_UDP:
-					tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP;
+					tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_OTHER:
drivers/net/ice/base/ice_switch.c +0 -0
 					tun_type = ICE_SW_TUN_PPPOE_IPV6;
drivers/net/ice/base/ice_switch.h +1 -1
index cc3d2702e..77c70d3b2 100644
@@ -28,6 +28,7 @@
 #define ICE_PROFID_PPPOE_IPV6_UDP	39
 #define ICE_PROFID_PPPOE_IPV6_OTHER	40
 #define ICE_PROFID_IPV4_GTPC_TEID	41
+#define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER	47
 #define ICE_PROFID_IPV6_GTPU_IPV6_OTHER	70
 #define ICE_PROFID_IPV4_ESP		71
 #define ICE_PROFID_IPV6_ESP		72
--

2.19.1

author
#3 lore raw

H, qi

Quoted 17 lines

-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Wednesday, July 15, 2020 10:02 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: Lu, Nannan <[email protected]>
Subject: RE: [PATCH] net/ice: fix tunnel type get error

Quoted 8 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Wednesday, July 15, 2020 10:08 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Nannan <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] net/ice: fix tunnel type get error

Quoted 6 lines
Quoted 2 lines

When get tunnel type for ICE_NON_TUN, there need some upodate for gtp related pctype.

please reword the commit log, what do you mean "get tunnel type for ICE_NON_TUN"?
also we don't have pctype in ice, please use profile.

Yes, ice use ptype.

Quoted 51 lines
Quoted 50 lines
Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")
---
 drivers/net/ice/base/ice_switch.c | 4 ++--
drivers/net/ice/base/ice_switch.h
| 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ice/base/ice_switch.c +2 -2
index 296aa5484..ebf405f7a 100644
@@ -1069,7 +1069,7 @@ static enum ice_sw_tunnel_type
 ice_get_tun_type_for_recipe(u8 rid)
 				non_tun_valid = true;
 		}
 
-		if (j >= ICE_PROFID_IPV4_GTPC_TEID &&
+		if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER &&
 		    j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER)
 			gtp_valid = true;
@@ -1136,7 +1136,7 @@ static enum ice_sw_tunnel_type
 ice_get_tun_type_for_recipe(u8 rid)
 					tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_UDP:
-					tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP;
+					tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_OTHER:

tun_type = ICE_SW_TUN_PPPOE_IPV6; diff --git
a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h
index cc3d2702e..77c70d3b2 100644

drivers/net/ice/base/ice_switch.h +1 -1
@@ -28,6 +28,7 @@
 #define ICE_PROFID_PPPOE_IPV6_UDP	39
 #define ICE_PROFID_PPPOE_IPV6_OTHER	40
 #define ICE_PROFID_IPV4_GTPC_TEID	41
+#define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER	47
 #define ICE_PROFID_IPV6_GTPU_IPV6_OTHER	70
 #define ICE_PROFID_IPV4_ESP		71
 #define ICE_PROFID_IPV6_ESP		72
--

2.19.1

author
#4 lore raw

PATCH v2 1/1 net/ice: fix tunnel type get error

In reply to Wei Zhao

When function ice_get_tun_type_for_recipe() get tunnel type, for ICE_NON_TUN we need to include gtp-c and some gtp-u ptype with no payload, as they do not have tunnel packet as paylod.

Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")
---
 drivers/net/ice/base/ice_switch.c | 4 ++--
 drivers/net/ice/base/ice_switch.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ice/base/ice_switch.c +2 -2
index 296aa5484..ebf405f7a 100644
@@ -1069,7 +1069,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
 				non_tun_valid = true;
 		}
 
-		if (j >= ICE_PROFID_IPV4_GTPC_TEID &&
+		if (j >= ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER &&
 		    j <= ICE_PROFID_IPV6_GTPU_IPV6_OTHER)
 			gtp_valid = true;
 
@@ -1136,7 +1136,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
 					tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_UDP:
-					tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP;
+					tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP;
 					break;
 				case ICE_PROFID_PPPOE_IPV6_OTHER:
 					tun_type = ICE_SW_TUN_PPPOE_IPV6;
drivers/net/ice/base/ice_switch.h +1 -0
index cc3d2702e..77c70d3b2 100644
@@ -28,6 +28,7 @@
 #define ICE_PROFID_PPPOE_IPV6_UDP	39
 #define ICE_PROFID_PPPOE_IPV6_OTHER	40
 #define ICE_PROFID_IPV4_GTPC_TEID	41
+#define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER	47
 #define ICE_PROFID_IPV6_GTPU_IPV6_OTHER	70
 #define ICE_PROFID_IPV4_ESP		71
 #define ICE_PROFID_IPV6_ESP		72
Signature · 1 line
2.19.1
Acked-by on v2 1/1 Applied
#5 lore raw
Quoted 9 lines

-----Original Message-----
From: Zhao1, Wei <[email protected]>
Sent: Thursday, July 16, 2020 9:42 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH v2] net/ice: fix tunnel type get error

Quoted 8 lines

When function ice_get_tun_type_for_recipe() get tunnel type, for ICE_NON_TUN we need to include gtp-c and some gtp-u ptype with no payload, as they do not have tunnel packet as paylod.

Fixes 418d2563d10b ("net/ice/base: get tunnel type for recipe")

Applied to dpdk-next-net-intel.

Thanks
Qi