From: Yahui Cao Date: Thu, 21 Nov 2019 11:20:14 +0000 (+0800) Subject: net/ice: fix pattern name of GTPU with extension header X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c08a72c79c7fe7a8c0f616e8489286d511d88d27;p=dpdk.git net/ice: fix pattern name of GTPU with extension header 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 Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 6b104911c7..f63cb7b167 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -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; diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index 1d8c834180..6bc3086ea9 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -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, diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h index b6e4ed0e17..a598ceabca 100644 --- a/drivers/net/ice/ice_generic_flow.h +++ b/drivers/net/ice/ice_generic_flow.h @@ -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[]; diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 2e9c1bc671..b145a3f0d5 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -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}, }; /**