Skip to contentSkip to conversation

net/ice/base: clean code of finding GTPU dummy pkt

PATCH Applied Yuying Zhang 2 participants 2 messages Apr 26, 2021 – Apr 28, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice/base: clean code of finding GTPU dummy pkt

Four gtpu tunnel types are used twice to find gtpu dummy packets (ipv4_gtpu_ipv4/ipv6, ipv6_gtpu_ipv4/ipv6). Clean redundant code.

---
 drivers/net/ice/base/ice_switch.c | 28 ----------------------------
 1 file changed, 28 deletions(-)
drivers/net/ice/base/ice_switch.c +0 -28
index 2a9bea4261..0ca68b8496 100644
@@ -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);
Signature · 1 line
2.25.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Zhang, Yuying <[email protected]>
Sent: Monday, April 26, 2021 3:18 PM
To: [email protected]; Zhang, Qi Z <[email protected]>
Cc: Zhang, Yuying <[email protected]>
Subject: [PATCH v1] net/ice/base: clean code of finding GTPU dummy pkt

Quoted 4 lines

Four gtpu tunnel types are used twice to find gtpu dummy packets (ipv4_gtpu_ipv4/ipv6, ipv6_gtpu_ipv4/ipv6). Clean redundant code.

Applied to dpdk-next-net-intel.

Thanks
Qi