From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A36ACA04C1; Wed, 20 Nov 2019 08:22:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8AFAF7CBC; Wed, 20 Nov 2019 08:22:17 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 66F345B3E for ; Wed, 20 Nov 2019 08:22:15 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 23:22:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="196761429" Received: from dpdk-yahui-skylake.sh.intel.com ([10.67.119.16]) by orsmga007.jf.intel.com with ESMTP; 19 Nov 2019 23:22:12 -0800 From: Yahui Cao To: Qiming Yang , Wenzhuo Lu Cc: dev@dpdk.org, Qi Zhang , Yahui Cao , Xiaolong Ye , Ying A Wang , Simei Su , Chenmin Sun Date: Wed, 20 Nov 2019 23:05:48 +0800 Message-Id: <20191120150549.54533-2-yahui.cao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191120150549.54533-1-yahui.cao@intel.com> References: <20191120132836.75142-1-yahui.cao@intel.com> <20191120150549.54533-1-yahui.cao@intel.com> Subject: [dpdk-dev] [PATCH v2 1/2] net/ice: fix GTPU extension header renaming X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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