net/ice: fix tunnel type get
authorWei Zhao <wei.zhao1@intel.com>
Thu, 16 Jul 2020 01:42:12 +0000 (09:42 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jul 2020 16:21:21 +0000 (18:21 +0200)
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")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Nannan Lu <nannan.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_switch.c
drivers/net/ice/base/ice_switch.h

index 296aa54..ebf405f 100644 (file)
@@ -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;
index cc3d270..77c70d3 100644 (file)
@@ -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