* [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU @ 2019-11-20 13:28 Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix Yahui Cao ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-20 13:28 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun This patch series fixes FDIR support only for GTP-U with extension header by adding support for GTP-U without extension header. - Patch 1 fixes ice flow GTPU with extension header definition - Patch 2 adds FDIR support for non-extension-header GTPU -- Yahui Cao (2): net/ice: fix GTPU and GTPU extension header mix net/ice: fix FDIR support for GTPU without extension header drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- drivers/net/ice/ice_generic_flow.h | 7 ++++--- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 4 files changed, 39 insertions(+), 24 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix 2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao @ 2019-11-20 13:28 ` Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao 2 siblings, 0 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-20 13:28 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun GTP-U packet with extension header is GTP-U packet with GTP_PSC header inserted between GTP-U header and inner payload. Fixes: 3e4eab9c2192 ("net/ice: add pattern manifest") Cc: ying.a.wang@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- drivers/net/ice/ice_generic_flow.h | 7 ++++--- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index 5594f8555..4f29dbaa0 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -1035,6 +1035,14 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = { /* GTPU */ enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_END, +}; +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 +1051,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 +1061,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 +1072,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 b6e4ed0e1..ac085b47f 100644 --- a/drivers/net/ice/ice_generic_flow.h +++ b/drivers/net/ice/ice_generic_flow.h @@ -337,9 +337,10 @@ 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 2e9c1bc67..b145a3f0d 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}, }; /** -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header 2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix Yahui Cao @ 2019-11-20 13:28 ` Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao 2 siblings, 0 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-20 13:28 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC extension header. Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") Cc: yahui.cao@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 9e251cee5..7214380ea 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -68,6 +68,9 @@ ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT) #define ICE_FDIR_INSET_GTPU_IPV4 (\ + ICE_INSET_GTPU_TEID) + +#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[] = { @@ -123,6 +126,8 @@ static struct ice_pattern_match_item ice_fdir_pattern_comms[] = { {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; @@ -837,6 +842,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER: ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH | + ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4); break; default: @@ -1733,6 +1739,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.teid = gtp_spec->teid; } + + tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; case RTE_FLOW_ITEM_TYPE_GTP_PSC: gtp_psc_spec = item->spec; @@ -1745,8 +1753,6 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.qfi = gtp_psc_spec->qfi; } - - tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; default: rte_flow_error_set(error, EINVAL, -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU 2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao @ 2019-11-20 15:05 ` Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao ` (2 more replies) 2 siblings, 3 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-20 15:05 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun This patch series enables FDIR support for both GTP-U and GTP-U with extension header. - Patch 1 renames GTPU with extension header related variables - Patch 2 adds FDIR support for non-extension-header GTPU -- Yahui Cao (2): net/ice: fix GTPU extension header renaming net/ice: fix FDIR support for GTPU without extension header drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- drivers/net/ice/ice_generic_flow.h | 7 ++++--- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 4 files changed, 39 insertions(+), 24 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao @ 2019-11-20 15:05 ` Yahui Cao 2019-11-20 9:17 ` Zhang, Qi Z 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao 2 siblings, 1 reply; 13+ messages in thread From: Yahui Cao @ 2019-11-20 15:05 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun GTP-U packet with extension header is GTP-U packet with GTP_PSC header inserted between GTP-U header and inner payload. Fixes: 3e4eab9c2192 ("net/ice: add pattern manifest") Cc: ying.a.wang@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_fdir_filter.c | 5 +++-- drivers/net/ice/ice_generic_flow.c | 8 ++++---- drivers/net/ice/ice_generic_flow.h | 8 ++++---- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 9e251cee5..dc7a97acb 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 5594f8555..a235337ba 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 b6e4ed0e1..a598ceabc 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 2e9c1bc67..b145a3f0d 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}, }; /** -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao @ 2019-11-20 9:17 ` Zhang, Qi Z 0 siblings, 0 replies; 13+ messages in thread From: Zhang, Qi Z @ 2019-11-20 9:17 UTC (permalink / raw) To: Cao, Yahui, Yang, Qiming, Lu, Wenzhuo Cc: dev, Ye, Xiaolong, Wang, Ying A, Su, Simei, Sun, Chenmin > -----Original Message----- > From: Cao, Yahui <yahui.cao@intel.com> > Sent: Wednesday, November 20, 2019 11:06 PM > To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo > <wenzhuo.lu@intel.com> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui > <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Wang, Ying A > <ying.a.wang@intel.com>; Su, Simei <simei.su@intel.com>; Sun, Chenmin > <chenmin.sun@intel.com> > Subject: [PATCH v2 1/2] net/ice: fix GTPU extension header renaming How about "fix pattern name of GTPU with extension header"? > > GTP-U packet with extension header is GTP-U packet with GTP_PSC header > inserted between GTP-U header and inner payload. Pattern name of GTP-U flow with extension header should be xxx_gtp_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") > Cc: ying.a.wang@intel.com > > Signed-off-by: Yahui Cao <yahui.cao@intel.com> > --- > drivers/net/ice/ice_fdir_filter.c | 5 +++-- > drivers/net/ice/ice_generic_flow.c | 8 ++++---- > drivers/net/ice/ice_generic_flow.h | 8 ++++---- > drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- > 4 files changed, 27 insertions(+), 26 deletions(-) > > diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c > index 9e251cee5..dc7a97acb 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 5594f8555..a235337ba 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 b6e4ed0e1..a598ceabc 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 > 2e9c1bc67..b145a3f0d 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}, > }; > > /** > -- > 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao @ 2019-11-20 15:05 ` Yahui Cao 2019-11-20 9:18 ` Zhang, Qi Z 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao 2 siblings, 1 reply; 13+ messages in thread From: Yahui Cao @ 2019-11-20 15:05 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC extension header. Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") Cc: yahui.cao@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_fdir_filter.c | 9 +++++++-- drivers/net/ice/ice_generic_flow.c | 8 ++++++++ drivers/net/ice/ice_generic_flow.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index dc7a97acb..7214380ea 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -67,6 +67,9 @@ ICE_FDIR_INSET_VXLAN_IPV4 | \ ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT) +#define ICE_FDIR_INSET_GTPU_IPV4 (\ + ICE_INSET_GTPU_TEID) + #define ICE_FDIR_INSET_GTPU_EH_IPV4 (\ ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI) @@ -122,6 +125,7 @@ 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}, }; @@ -838,6 +842,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER: ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH | + ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4); break; default: @@ -1734,6 +1739,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.teid = gtp_spec->teid; } + + tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; case RTE_FLOW_ITEM_TYPE_GTP_PSC: gtp_psc_spec = item->spec; @@ -1746,8 +1753,6 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.qfi = gtp_psc_spec->qfi; } - - tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; default: rte_flow_error_set(error, EINVAL, diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index a235337ba..4f29dbaa0 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -1034,6 +1034,14 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = { }; /* GTPU */ +enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_END, +}; enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = { RTE_FLOW_ITEM_TYPE_ETH, RTE_FLOW_ITEM_TYPE_IPV4, diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h index a598ceabc..ac085b47f 100644 --- a/drivers/net/ice/ice_generic_flow.h +++ b/drivers/net/ice/ice_generic_flow.h @@ -336,6 +336,7 @@ 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_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[]; -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao @ 2019-11-20 9:18 ` Zhang, Qi Z 0 siblings, 0 replies; 13+ messages in thread From: Zhang, Qi Z @ 2019-11-20 9:18 UTC (permalink / raw) To: Cao, Yahui, Yang, Qiming, Lu, Wenzhuo Cc: dev, Ye, Xiaolong, Wang, Ying A, Su, Simei, Sun, Chenmin > -----Original Message----- > From: Cao, Yahui <yahui.cao@intel.com> > Sent: Wednesday, November 20, 2019 11:06 PM > To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo > <wenzhuo.lu@intel.com> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui > <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Wang, Ying A > <ying.a.wang@intel.com>; Su, Simei <simei.su@intel.com>; Sun, Chenmin > <chenmin.sun@intel.com> > Subject: [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension > header > > Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC > extension header. > > Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") > Cc: yahui.cao@intel.com > > Signed-off-by: Yahui Cao <yahui.cao@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao @ 2019-11-21 11:20 ` Yahui Cao 2019-11-21 3:58 ` Zhang, Qi Z ` (3 more replies) 2 siblings, 4 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-21 11:20 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun This patch series enables FDIR support for both GTP-U and GTP-U with extension header. - Patch 1 renames GTPU with extension header related variables - Patch 2 adds FDIR support for non-extension-header GTPU -- v3: * Change commit message v2: * Re-organize patch Yahui Cao (2): net/ice: fix pattern name of GTPU with extension header net/ice: add missing FDIR support for GTPU without extension header drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- drivers/net/ice/ice_generic_flow.h | 7 ++++--- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 4 files changed, 39 insertions(+), 24 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao @ 2019-11-21 3:58 ` Zhang, Qi Z 2019-11-21 5:27 ` Ye Xiaolong ` (2 subsequent siblings) 3 siblings, 0 replies; 13+ messages in thread From: Zhang, Qi Z @ 2019-11-21 3:58 UTC (permalink / raw) To: Cao, Yahui, Yang, Qiming, Lu, Wenzhuo Cc: dev, Ye, Xiaolong, Wang, Ying A, Su, Simei, Sun, Chenmin > -----Original Message----- > From: Cao, Yahui <yahui.cao@intel.com> > Sent: Thursday, November 21, 2019 7:20 PM > To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo > <wenzhuo.lu@intel.com> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui > <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Wang, Ying A > <ying.a.wang@intel.com>; Su, Simei <simei.su@intel.com>; Sun, Chenmin > <chenmin.sun@intel.com> > Subject: [PATCH v3 0/2] fix FDIR support for GTPU > > This patch series enables FDIR support for both GTP-U and GTP-U with > extension header. > > - Patch 1 renames GTPU with extension header related variables > - Patch 2 adds FDIR support for non-extension-header GTPU > > -- > v3: > * Change commit message > > v2: > * Re-organize patch > > Yahui Cao (2): > net/ice: fix pattern name of GTPU with extension header > net/ice: add missing FDIR support for GTPU without extension header > > drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- > drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- > drivers/net/ice/ice_generic_flow.h | 7 ++++--- > drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- > 4 files changed, 39 insertions(+), 24 deletions(-) > > -- > 2.17.1 Acked-by: Qi Zhang <qi.z.zhang@intel.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-21 3:58 ` Zhang, Qi Z @ 2019-11-21 5:27 ` Ye Xiaolong 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header Yahui Cao 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without " Yahui Cao 3 siblings, 0 replies; 13+ messages in thread From: Ye Xiaolong @ 2019-11-21 5:27 UTC (permalink / raw) To: Yahui Cao Cc: Qiming Yang, Wenzhuo Lu, dev, Qi Zhang, Ying A Wang, Simei Su, Chenmin Sun On 11/21, Yahui Cao wrote: >This patch series enables FDIR support for both GTP-U and GTP-U with >extension header. > >- Patch 1 renames GTPU with extension header related variables >- Patch 2 adds FDIR support for non-extension-header GTPU > >-- >v3: >* Change commit message > >v2: >* Re-organize patch > >Yahui Cao (2): > net/ice: fix pattern name of GTPU with extension header > net/ice: add missing FDIR support for GTPU without extension header > > drivers/net/ice/ice_fdir_filter.c | 10 ++++++++-- > drivers/net/ice/ice_generic_flow.c | 14 ++++++++++--- > drivers/net/ice/ice_generic_flow.h | 7 ++++--- > drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- > 4 files changed, 39 insertions(+), 24 deletions(-) > >-- >2.17.1 > Series applied to dpdk-next-net-intel, Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-21 3:58 ` Zhang, Qi Z 2019-11-21 5:27 ` Ye Xiaolong @ 2019-11-21 11:20 ` Yahui Cao 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without " Yahui Cao 3 siblings, 0 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-21 11:20 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun 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") Cc: ying.a.wang@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_fdir_filter.c | 5 +++-- drivers/net/ice/ice_generic_flow.c | 8 ++++---- drivers/net/ice/ice_generic_flow.h | 8 ++++---- drivers/net/ice/ice_hash.c | 32 +++++++++++++++--------------- 4 files changed, 27 insertions(+), 26 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 9e251cee5..dc7a97acb 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 5594f8555..a235337ba 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 b6e4ed0e1..a598ceabc 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 2e9c1bc67..b145a3f0d 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}, }; /** -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without extension header 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao ` (2 preceding siblings ...) 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header Yahui Cao @ 2019-11-21 11:20 ` Yahui Cao 3 siblings, 0 replies; 13+ messages in thread From: Yahui Cao @ 2019-11-21 11:20 UTC (permalink / raw) To: Qiming Yang, Wenzhuo Lu Cc: dev, Qi Zhang, Yahui Cao, Xiaolong Ye, Ying A Wang, Simei Su, Chenmin Sun Add FDIR support for normal GTP-U packet, which doesn't contain GTP_PSC extension header. Fixes: efc16c621415 ("net/ice: support flow director GTPU tunnel") Cc: yahui.cao@intel.com Signed-off-by: Yahui Cao <yahui.cao@intel.com> --- drivers/net/ice/ice_fdir_filter.c | 9 +++++++-- drivers/net/ice/ice_generic_flow.c | 8 ++++++++ drivers/net/ice/ice_generic_flow.h | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index dc7a97acb..7214380ea 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -67,6 +67,9 @@ ICE_FDIR_INSET_VXLAN_IPV4 | \ ICE_INSET_TUN_SCTP_SRC_PORT | ICE_INSET_TUN_SCTP_DST_PORT) +#define ICE_FDIR_INSET_GTPU_IPV4 (\ + ICE_INSET_GTPU_TEID) + #define ICE_FDIR_INSET_GTPU_EH_IPV4 (\ ICE_INSET_GTPU_TEID | ICE_INSET_GTPU_QFI) @@ -122,6 +125,7 @@ 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}, }; @@ -838,6 +842,7 @@ ice_fdir_input_set_conf(struct ice_pf *pf, enum ice_fltr_ptype flow, case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_ICMP: case ICE_FLTR_PTYPE_NONF_IPV4_GTPU_IPV4_OTHER: ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_GTPU_EH | + ICE_FLOW_SEG_HDR_GTPU_IP | ICE_FLOW_SEG_HDR_IPV4); break; default: @@ -1734,6 +1739,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.teid = gtp_spec->teid; } + + tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; case RTE_FLOW_ITEM_TYPE_GTP_PSC: gtp_psc_spec = item->spec; @@ -1746,8 +1753,6 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->input.gtpu_data.qfi = gtp_psc_spec->qfi; } - - tunnel_type = ICE_FDIR_TUNNEL_TYPE_GTPU; break; default: rte_flow_error_set(error, EINVAL, diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index a235337ba..4f29dbaa0 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -1034,6 +1034,14 @@ enum rte_flow_item_type pattern_eth_ipv6_nvgre_eth_ipv6_icmp6[] = { }; /* GTPU */ +enum rte_flow_item_type pattern_eth_ipv4_gtpu_ipv4[] = { + RTE_FLOW_ITEM_TYPE_ETH, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_UDP, + RTE_FLOW_ITEM_TYPE_GTPU, + RTE_FLOW_ITEM_TYPE_IPV4, + RTE_FLOW_ITEM_TYPE_END, +}; enum rte_flow_item_type pattern_eth_ipv4_gtpu_eh_ipv4[] = { RTE_FLOW_ITEM_TYPE_ETH, RTE_FLOW_ITEM_TYPE_IPV4, diff --git a/drivers/net/ice/ice_generic_flow.h b/drivers/net/ice/ice_generic_flow.h index a598ceabc..ac085b47f 100644 --- a/drivers/net/ice/ice_generic_flow.h +++ b/drivers/net/ice/ice_generic_flow.h @@ -336,6 +336,7 @@ 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_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[]; -- 2.17.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-11-21 5:31 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-20 13:28 [dpdk-dev] [PATCH 0/2] fix FDIR support for non-extension-header GTPU Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 1/2] net/ice: fix GTPU and GTPU extension header mix Yahui Cao 2019-11-20 13:28 ` [dpdk-dev] [PATCH 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming Yahui Cao 2019-11-20 9:17 ` Zhang, Qi Z 2019-11-20 15:05 ` [dpdk-dev] [PATCH v2 2/2] net/ice: fix FDIR support for GTPU without extension header Yahui Cao 2019-11-20 9:18 ` Zhang, Qi Z 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 0/2] fix FDIR support for GTPU Yahui Cao 2019-11-21 3:58 ` Zhang, Qi Z 2019-11-21 5:27 ` Ye Xiaolong 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 1/2] net/ice: fix pattern name of GTPU with extension header Yahui Cao 2019-11-21 11:20 ` [dpdk-dev] [PATCH v3 2/2] net/ice: add missing FDIR support for GTPU without " Yahui Cao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).