[v5,5/5] net/ice: fix typo
diff mbox series

Message ID 20200629051030.3541-6-wei.zhao1@intel.com
State Superseded
Delegated to: Qi Zhang
Headers show
Series
  • enable more PPPoE packet type for switch
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Wei Zhao June 29, 2020, 5:10 a.m. UTC
fix typo of "valid".

Fixes: 8f5d8e74fb38 ("net/ice: support flow for AH ESP and L2TP")
Fixes: 66ff8851792f ("net/ice: support ESP/AH/L2TP")
Fixes: 45b53ed3701d ("net/ice: support IPv6 NAT-T")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 76 ++++++++++++++---------------
 1 file changed, 38 insertions(+), 38 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 5054555c2..267af5a54 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -480,10 +480,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 	bool profile_rule = 0;
 	bool nvgre_valid = 0;
 	bool vxlan_valid = 0;
-	bool ipv6_valiad = 0;
-	bool ipv4_valiad = 0;
-	bool udp_valiad = 0;
-	bool tcp_valiad = 0;
+	bool ipv6_valid = 0;
+	bool ipv4_valid = 0;
+	bool udp_valid = 0;
+	bool tcp_valid = 0;
 	uint16_t j, t = 0;
 
 	for (item = pattern; item->type !=
@@ -570,7 +570,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 		case RTE_FLOW_ITEM_TYPE_IPV4:
 			ipv4_spec = item->spec;
 			ipv4_mask = item->mask;
-			ipv4_valiad = 1;
+			ipv4_valid = 1;
 			if (ipv4_spec && ipv4_mask) {
 				/* Check IPv4 mask and update input set */
 				if (ipv4_mask->hdr.version_ihl ||
@@ -662,7 +662,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 		case RTE_FLOW_ITEM_TYPE_IPV6:
 			ipv6_spec = item->spec;
 			ipv6_mask = item->mask;
-			ipv6_valiad = 1;
+			ipv6_valid = 1;
 			if (ipv6_spec && ipv6_mask) {
 				if (ipv6_mask->hdr.payload_len) {
 					rte_flow_error_set(error, EINVAL,
@@ -780,7 +780,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 		case RTE_FLOW_ITEM_TYPE_UDP:
 			udp_spec = item->spec;
 			udp_mask = item->mask;
-			udp_valiad = 1;
+			udp_valid = 1;
 			if (udp_spec && udp_mask) {
 				/* Check UDP mask and update input set*/
 				if (udp_mask->hdr.dgram_len ||
@@ -833,7 +833,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 		case RTE_FLOW_ITEM_TYPE_TCP:
 			tcp_spec = item->spec;
 			tcp_mask = item->mask;
-			tcp_valiad = 1;
+			tcp_valid = 1;
 			if (tcp_spec && tcp_mask) {
 				/* Check TCP mask and update input set */
 				if (tcp_mask->hdr.sent_seq ||
@@ -1151,16 +1151,16 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 
 			if (!esp_spec && !esp_mask && !input_set) {
 				profile_rule = 1;
-				if (ipv6_valiad && udp_valiad)
+				if (ipv6_valid && udp_valid)
 					*tun_type =
 					ICE_SW_TUN_PROFID_IPV6_NAT_T;
-				else if (ipv6_valiad)
+				else if (ipv6_valid)
 					*tun_type = ICE_SW_TUN_PROFID_IPV6_ESP;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					return 0;
 			} else if (esp_spec && esp_mask &&
 						esp_mask->hdr.spi){
-				if (udp_valiad)
+				if (udp_valid)
 					list[t].type = ICE_NAT_T;
 				else
 					list[t].type = ICE_ESP;
@@ -1174,13 +1174,13 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 			}
 
 			if (!profile_rule) {
-				if (ipv6_valiad && udp_valiad)
+				if (ipv6_valid && udp_valid)
 					*tun_type = ICE_SW_TUN_IPV6_NAT_T;
-				else if (ipv4_valiad && udp_valiad)
+				else if (ipv4_valid && udp_valid)
 					*tun_type = ICE_SW_TUN_IPV4_NAT_T;
-				else if (ipv6_valiad)
+				else if (ipv6_valid)
 					*tun_type = ICE_SW_TUN_IPV6_ESP;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					*tun_type = ICE_SW_TUN_IPV4_ESP;
 			}
 			break;
@@ -1211,12 +1211,12 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 
 			if (!ah_spec && !ah_mask && !input_set) {
 				profile_rule = 1;
-				if (ipv6_valiad && udp_valiad)
+				if (ipv6_valid && udp_valid)
 					*tun_type =
 					ICE_SW_TUN_PROFID_IPV6_NAT_T;
-				else if (ipv6_valiad)
+				else if (ipv6_valid)
 					*tun_type = ICE_SW_TUN_PROFID_IPV6_AH;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					return 0;
 			} else if (ah_spec && ah_mask &&
 						ah_mask->spi){
@@ -1231,11 +1231,11 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 			}
 
 			if (!profile_rule) {
-				if (udp_valiad)
+				if (udp_valid)
 					return 0;
-				else if (ipv6_valiad)
+				else if (ipv6_valid)
 					*tun_type = ICE_SW_TUN_IPV6_AH;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					*tun_type = ICE_SW_TUN_IPV4_AH;
 			}
 			break;
@@ -1253,10 +1253,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 			}
 
 			if (!l2tp_spec && !l2tp_mask && !input_set) {
-				if (ipv6_valiad)
+				if (ipv6_valid)
 					*tun_type =
 					ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					return 0;
 			} else if (l2tp_spec && l2tp_mask &&
 						l2tp_mask->session_id){
@@ -1271,10 +1271,10 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 			}
 
 			if (!profile_rule) {
-				if (ipv6_valiad)
+				if (ipv6_valid)
 					*tun_type =
 					ICE_SW_TUN_IPV6_L2TPV3;
-				else if (ipv4_valiad)
+				else if (ipv4_valid)
 					*tun_type =
 					ICE_SW_TUN_IPV4_L2TPV3;
 			}
@@ -1308,7 +1308,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 				}
 				if (pfcp_mask->s_field &&
 					pfcp_spec->s_field == 0x01 &&
-					ipv6_valiad)
+					ipv6_valid)
 					*tun_type =
 					ICE_SW_TUN_PROFID_IPV6_PFCP_SESSION;
 				else if (pfcp_mask->s_field &&
@@ -1317,7 +1317,7 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 					ICE_SW_TUN_PROFID_IPV4_PFCP_SESSION;
 				else if (pfcp_mask->s_field &&
 					!pfcp_spec->s_field &&
-					ipv6_valiad)
+					ipv6_valid)
 					*tun_type =
 					ICE_SW_TUN_PROFID_IPV6_PFCP_NODE;
 				else if (pfcp_mask->s_field &&
@@ -1341,17 +1341,17 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 	}
 
 	if (pppoe_patt_valid && !pppoe_prot_valid) {
-		if (ipv6_valiad && udp_valiad)
+		if (ipv6_valid && udp_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV6_UDP;
-		else if (ipv6_valiad && tcp_valiad)
+		else if (ipv6_valid && tcp_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV6_TCP;
-		else if (ipv4_valiad && udp_valiad)
+		else if (ipv4_valid && udp_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV4_UDP;
-		else if (ipv4_valiad && tcp_valiad)
+		else if (ipv4_valid && tcp_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV4_TCP;
-		else if (ipv6_valiad)
+		else if (ipv6_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV6;
-		else if (ipv4_valiad)
+		else if (ipv4_valid)
 			*tun_type = ICE_SW_TUN_PPPOE_IPV4;
 		else
 			*tun_type = ICE_SW_TUN_PPPOE;
@@ -1362,13 +1362,13 @@  ice_switch_inset_get(const struct rte_flow_item pattern[],
 			*tun_type = ICE_SW_TUN_VXLAN;
 		else if (nvgre_valid)
 			*tun_type = ICE_SW_TUN_NVGRE;
-		else if (ipv4_valiad && tcp_valiad)
+		else if (ipv4_valid && tcp_valid)
 			*tun_type = ICE_SW_IPV4_TCP;
-		else if (ipv4_valiad && udp_valiad)
+		else if (ipv4_valid && udp_valid)
 			*tun_type = ICE_SW_IPV4_UDP;
-		else if (ipv6_valiad && tcp_valiad)
+		else if (ipv6_valid && tcp_valid)
 			*tun_type = ICE_SW_IPV6_TCP;
-		else if (ipv6_valiad && udp_valiad)
+		else if (ipv6_valid && udp_valid)
 			*tun_type = ICE_SW_IPV6_UDP;
 	}