net/ice: fix pattern name of GTPU with extension header
authorYahui Cao <yahui.cao@intel.com>
Thu, 21 Nov 2019 11:20:14 +0000 (19:20 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 26 Nov 2019 17:05:15 +0000 (18:05 +0100)
Pattern name of GTP-U flow with extension header should be
xxx_gtpu_eh_xxx. So it will not conflict with the pattern name of a
GTP-U flow that does not contains extension header.

Fixes: 3e4eab9c2192 ("net/ice: add pattern manifest")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_fdir_filter.c
drivers/net/ice/ice_generic_flow.c
drivers/net/ice/ice_generic_flow.h
drivers/net/ice/ice_hash.c

index 6b10491..f63cb7b 100644 (file)
@@ -67,7 +67,7 @@
        ICE_FDIR_INSET_VXLAN_IPV4 | \
        ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT)
 
-#define ICE_FDIR_INSET_GTPU_IPV4 (\
+#define ICE_FDIR_INSET_GTPU_EH_IPV4 (\
        ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI)
 
 static struct ice_pattern_match_item ice_fdir_pattern_os[] = {
@@ -122,7 +122,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = {
                                       ICE_FDIR_INSET_VXLAN_IPV4_TCP,        ICE_INSET_NONE},
        {pattern_eth_ipv4_udp_vxlan_eth_ipv4_sctp,
                                       ICE_FDIR_INSET_VXLAN_IPV4_SCTP,       ICE_INSET_NONE},
-       {pattern_eth_ipv4_gtpu_ipv4,   ICE_FDIR_INSET_GTPU_IPV4,             ICE_INSET_NONE},
+       {pattern_eth_ipv4_gtpu_eh_ipv4,
+                                      ICE_FDIR_INSET_GTPU_EH_IPV4,          ICE_INSET_NONE},
 };
 
 static struct ice_flow_parser ice_fdir_parser_os;
index 1d8c834..6bc3086 100644 (file)
@@ -1034,7 +1034,7 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = {
 };
 
 /* GTPU */
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = {
        RTE_FLOW_ITEM_TYPE_ETH,
        RTE_FLOW_ITEM_TYPE_IPV4,
        RTE_FLOW_ITEM_TYPE_UDP,
@@ -1043,7 +1043,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = {
        RTE_FLOW_ITEM_TYPE_IPV4,
        RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_udp[] = {
        RTE_FLOW_ITEM_TYPE_ETH,
        RTE_FLOW_ITEM_TYPE_IPV4,
        RTE_FLOW_ITEM_TYPE_UDP,
@@ -1053,7 +1053,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[] = {
        RTE_FLOW_ITEM_TYPE_UDP,
        RTE_FLOW_ITEM_TYPE_END,
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_tcp[] = {
        RTE_FLOW_ITEM_TYPE_ETH,
        RTE_FLOW_ITEM_TYPE_IPV4,
        RTE_FLOW_ITEM_TYPE_UDP,
@@ -1064,7 +1064,7 @@ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[] = {
        RTE_FLOW_ITEM_TYPE_END,
 
 };
-enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_icmp[] = {
+enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_icmp[] = {
        RTE_FLOW_ITEM_TYPE_ETH,
        RTE_FLOW_ITEM_TYPE_IPV4,
        RTE_FLOW_ITEM_TYPE_UDP,
index b6e4ed0..a598cea 100644 (file)
@@ -336,10 +336,10 @@ extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_sctp[];
 extern enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[];
 
 /* GTPU */
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_udp[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_tcp[];
-extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4_icmp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_udp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_tcp[];
+extern enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4_icmp[];
 
 /* PPPoE */
 extern enum rte_flow_item_type pattern_eth_pppoed[];
index 2e9c1bc..b145a3f 100644 (file)
@@ -120,22 +120,22 @@ static struct ice_pattern_match_item ice_hash_pattern_list_os[] = {
 
 /* Supported pattern for comms package. */
 static struct ice_pattern_match_item ice_hash_pattern_list_comms[] = {
-       {pattern_eth_ipv4,               ICE_INSET_NONE,  &hint_1},
-       {pattern_eth_ipv4_udp,           ICE_INSET_NONE,  &hint_2},
-       {pattern_eth_ipv4_tcp,           ICE_INSET_NONE,  &hint_3},
-       {pattern_eth_ipv4_sctp,          ICE_INSET_NONE,  &hint_4},
-       {pattern_eth_ipv6,               ICE_INSET_NONE,  &hint_5},
-       {pattern_eth_ipv6_udp,           ICE_INSET_NONE,  &hint_6},
-       {pattern_eth_ipv6_tcp,           ICE_INSET_NONE,  &hint_7},
-       {pattern_eth_ipv6_sctp,          ICE_INSET_NONE,  &hint_8},
-       {pattern_empty,                  ICE_INSET_NONE,  &hint_0},
-       {pattern_eth_ipv4_gtpu_ipv4,     ICE_INSET_NONE,  &hint_9},
-       {pattern_eth_ipv4_gtpu_ipv4_udp, ICE_INSET_NONE,  &hint_9},
-       {pattern_eth_ipv4_gtpu_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
-       {pattern_eth_pppoes_ipv4,        ICE_INSET_NONE,  &hint_10},
-       {pattern_eth_pppoes_ipv4_udp,    ICE_INSET_NONE,  &hint_11},
-       {pattern_eth_pppoes_ipv4_tcp,    ICE_INSET_NONE,  &hint_12},
-       {pattern_eth_pppoes_ipv4_sctp,   ICE_INSET_NONE,  &hint_13},
+       {pattern_eth_ipv4,                  ICE_INSET_NONE,  &hint_1},
+       {pattern_eth_ipv4_udp,              ICE_INSET_NONE,  &hint_2},
+       {pattern_eth_ipv4_tcp,              ICE_INSET_NONE,  &hint_3},
+       {pattern_eth_ipv4_sctp,             ICE_INSET_NONE,  &hint_4},
+       {pattern_eth_ipv6,                  ICE_INSET_NONE,  &hint_5},
+       {pattern_eth_ipv6_udp,              ICE_INSET_NONE,  &hint_6},
+       {pattern_eth_ipv6_tcp,              ICE_INSET_NONE,  &hint_7},
+       {pattern_eth_ipv6_sctp,             ICE_INSET_NONE,  &hint_8},
+       {pattern_empty,                     ICE_INSET_NONE,  &hint_0},
+       {pattern_eth_ipv4_gtpu_eh_ipv4,     ICE_INSET_NONE,  &hint_9},
+       {pattern_eth_ipv4_gtpu_eh_ipv4_udp, ICE_INSET_NONE,  &hint_9},
+       {pattern_eth_ipv4_gtpu_eh_ipv4_tcp, ICE_INSET_NONE,  &hint_9},
+       {pattern_eth_pppoes_ipv4,           ICE_INSET_NONE,  &hint_10},
+       {pattern_eth_pppoes_ipv4_udp,       ICE_INSET_NONE,  &hint_11},
+       {pattern_eth_pppoes_ipv4_tcp,       ICE_INSET_NONE,  &hint_12},
+       {pattern_eth_pppoes_ipv4_sctp,      ICE_INSET_NONE,  &hint_13},
 };
 
 /**