net/ice/base: clean duplicate in finding GTPU dummy packet
authorYuying Zhang <yuying.zhang@intel.com>
Mon, 26 Apr 2021 07:17:49 +0000 (07:17 +0000)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 28 Apr 2021 01:52:53 +0000 (03:52 +0200)
Four GTPU tunnel types are used twice to find GTPU dummy packets
(ipv4_gtpu_ipv4/ipv6, ipv6_gtpu_ipv4/ipv6). Clean redundant code.

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_switch.c

index c48e7b7..229b355 100644 (file)
@@ -8186,34 +8186,6 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,
                return;
        }
 
-       /* Support GTP tunnel + L3 */
-       if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV4 ||
-           tun_type == ICE_SW_TUN_GTP_IPV4) {
-               *pkt = dummy_ipv4_gtpu_ipv4_packet;
-               *pkt_len = sizeof(dummy_ipv4_gtpu_ipv4_packet);
-               *offsets = dummy_ipv4_gtpu_ipv4_packet_offsets;
-               return;
-       }
-       if (tun_type == ICE_SW_TUN_IPV4_GTPU_IPV6 ||
-           tun_type == ICE_SW_TUN_GTP_IPV6) {
-               *pkt = dummy_ipv4_gtpu_ipv6_packet;
-               *pkt_len = sizeof(dummy_ipv4_gtpu_ipv6_packet);
-               *offsets = dummy_ipv4_gtpu_ipv6_packet_offsets;
-               return;
-       }
-       if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV4) {
-               *pkt = dummy_ipv6_gtpu_ipv4_packet;
-               *pkt_len = sizeof(dummy_ipv6_gtpu_ipv4_packet);
-               *offsets = dummy_ipv6_gtpu_ipv4_packet_offsets;
-               return;
-       }
-       if (tun_type == ICE_SW_TUN_IPV6_GTPU_IPV6) {
-               *pkt = dummy_ipv6_gtpu_ipv6_packet;
-               *pkt_len = sizeof(dummy_ipv6_gtpu_ipv6_packet);
-               *offsets = dummy_ipv6_gtpu_ipv6_packet_offsets;
-               return;
-       }
-
        if (tun_type == ICE_ALL_TUNNELS) {
                *pkt = dummy_gre_udp_packet;
                *pkt_len = sizeof(dummy_gre_udp_packet);