From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A4112A00C3; Mon, 15 Aug 2022 01:27:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCA0642CB2; Mon, 15 Aug 2022 01:24:08 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 94C0B42CDE for ; Mon, 15 Aug 2022 01:24:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660519444; x=1692055444; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2fp3sCEDxEcN2JeMv2f/CC0/pgjEnHApl2QeHbJ1Pic=; b=WY/6JB3nnOiPIS03t5Lp8TrWstrOVqzXuMaZMXZZNNmhjMAJREvviMQP m3BOMzH/YyqxzFgrHhNuhgelEO9dYKiCxeDNl0s4jH0D3+rK5eka/e0v+ 9mL7p7TNN2QWbIJxSv4fyi/BAD/6dijG0onX9XcUiqtQJ2nZo4zBRKn9C iNvIilsn/+FZTebE+6nXaGpeHutYIFS03U5cnt0qPq6Q8j8s+878tjzFP nC32keruY/9fhVZYNfe+rfMRmPP6vEufQNKtODOVE2OCAnt7WQ+eIr4GE 1HL5nqGx+756AC/6XVHPOw5CVBamzTAow9Ci2O+KonEA0Hr1FcRfRrtfE g==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="274914524" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="274914524" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:24:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="635283374" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by orsmga008.jf.intel.com with ESMTP; 14 Aug 2022 16:24:02 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Marcin Szycik , Michal Swiatkowski Subject: [PATCH v2 66/70] net/ice/base: add GTP tunnel Date: Mon, 15 Aug 2022 03:32:02 -0400 Message-Id: <20220815073206.2917968-67-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815073206.2917968-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-1-qi.z.zhang@intel.com> <20220815073206.2917968-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Added GTP tunnel type and also re-order the code to align with kernel driver. Signed-off-by: Marcin Szycik Signed-off-by: Michal Swiatkowski Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_type.h | 10 +++++++--- drivers/net/ice/base/ice_protocol_type.h | 2 +- drivers/net/ice/base/ice_switch.c | 8 ++++---- drivers/net/ice/base/ice_switch.h | 3 +++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/net/ice/base/ice_flex_type.h b/drivers/net/ice/base/ice_flex_type.h index 070d2aeb1e..988a2db958 100644 --- a/drivers/net/ice/base/ice_flex_type.h +++ b/drivers/net/ice/base/ice_flex_type.h @@ -442,8 +442,10 @@ enum ice_tunnel_type { TNL_VXLAN = 0, TNL_GENEVE, TNL_GRETAP, - TNL_ECPRI, TNL_GTP, + TNL_GTPC, + TNL_GTPU, + TNL_ECPRI, TNL_LAST = 0xFF, TNL_ALL = 0xFF, }; @@ -724,8 +726,10 @@ enum ice_prof_type { ICE_PROF_NON_TUN = 0x1, ICE_PROF_TUN_UDP = 0x2, ICE_PROF_TUN_GRE = 0x4, - ICE_PROF_TUN_PPPOE = 0x8, - ICE_PROF_TUN_ALL = 0xE, + ICE_PROF_TUN_GTPU = 0x8, + ICE_PROF_TUN_GTPC = 0x10, + ICE_PROF_TUN_PPPOE = 0x20, + ICE_PROF_TUN_ALL = 0x3E, ICE_PROF_ALL = 0xFF, }; diff --git a/drivers/net/ice/base/ice_protocol_type.h b/drivers/net/ice/base/ice_protocol_type.h index 74107de988..da1f65fb22 100644 --- a/drivers/net/ice/base/ice_protocol_type.h +++ b/drivers/net/ice/base/ice_protocol_type.h @@ -45,13 +45,13 @@ enum ice_protocol_type { ICE_VXLAN_GPE, ICE_NVGRE, ICE_GTP, + ICE_GTP_NO_PAY, ICE_PPPOE, ICE_PFCP, ICE_L2TPV3, ICE_ESP, ICE_AH, ICE_NAT_T, - ICE_GTP_NO_PAY, ICE_VLAN_EX, ICE_VLAN_IN, ICE_FLG_DIR, diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index ac045790ad..bb7e76bd29 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -8556,10 +8556,6 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, len = sizeof(struct ice_udp_tnl_hdr); break; - case ICE_GTP: - case ICE_GTP_NO_PAY: - len = sizeof(struct ice_udp_gtp_hdr); - break; case ICE_PPPOE: len = sizeof(struct ice_pppoe_hdr); break; @@ -8575,6 +8571,10 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt, case ICE_L2TPV3: len = sizeof(struct ice_l2tpv3_sess_hdr); break; + case ICE_GTP: + case ICE_GTP_NO_PAY: + len = sizeof(struct ice_udp_gtp_hdr); + break; default: return ICE_ERR_PARAM; } diff --git a/drivers/net/ice/base/ice_switch.h b/drivers/net/ice/base/ice_switch.h index 3c05a1531f..dbad9363c4 100644 --- a/drivers/net/ice/base/ice_switch.h +++ b/drivers/net/ice/base/ice_switch.h @@ -28,7 +28,10 @@ #define ICE_PROFID_PPPOE_IPV6_UDP 39 #define ICE_PROFID_PPPOE_IPV6_OTHER 40 #define ICE_PROFID_IPV4_GTPC_TEID 41 +#define ICE_PROFID_IPV4_GTPC_NO_TEID 42 #define ICE_PROFID_IPV4_GTPU_TEID 43 +#define ICE_PROFID_IPV6_GTPC_TEID 44 +#define ICE_PROFID_IPV6_GTPC_NO_TEID 45 #define ICE_PROFID_IPV6_GTPU_TEID 46 #define ICE_PROFID_IPV4_GTPU_EH_IPV4_OTHER 47 #define ICE_PROFID_IPV4_GTPU_IPV4_OTHER 48 -- 2.31.1