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 D7265A00C3; Mon, 15 Aug 2022 01:09:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4277142CD4; Mon, 15 Aug 2022 01:04:54 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id A99BE427F3 for ; Mon, 15 Aug 2022 01:04:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660518291; x=1692054291; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2fp3sCEDxEcN2JeMv2f/CC0/pgjEnHApl2QeHbJ1Pic=; b=oHh8xJZLuUHgOkiLlG1tWlQkDca90LQv3I5FcDr0g0KGgpcsTcIQvUPO 3wmSsd8uroIdybblJBqS1QXuVQ531ZZcQgTsVZqaeOxvQHjZlY7O/FBOl cGnzegXbNMhSaQAmLZbGUD0JAXRMc7AkYzBRT26c+ZA5tW7QSL+6klrR3 7xeYiZO7u/ocKy6087b4WxkbsRqFS2kziz6hHUiOz6dLUD307Gmb5w1XK wE6GMHGHT7sac+fc4AMvNEDdMoFFCE9+oD5Cs8mZMIvxQLGOg+qhOw4zM VU6g/D2PDZV8MRAjXCCZK/t/h5fOLqJHUYxI6wZ1qwS/yRpfwImxeTP9o A==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="293128818" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="293128818" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2022 16:04:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="934296979" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2022 16:04:49 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Marcin Szycik , Michal Swiatkowski Subject: [PATCH 66/70] net/ice/base: add GTP tunnel Date: Mon, 15 Aug 2022 03:13:02 -0400 Message-Id: <20220815071306.2910599-67-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220815071306.2910599-1-qi.z.zhang@intel.com> References: <20220815071306.2910599-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