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 E7911A00C3; Mon, 15 Aug 2022 01:08:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F86542C99; Mon, 15 Aug 2022 01:04:38 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 7F7A242CA9 for ; Mon, 15 Aug 2022 01:04:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660518275; x=1692054275; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5Vujm7IodZWYnNsJywK4JUWRjm/MqxGSql6DvAzfxvA=; b=JT5iTuKigSX8Op+h6tgA4yo+HDJBTlKqxeSrgCd6RitekzEouUp2oUqw nhfNfegnHGBe33e1/aONjvOpessfVqLAN7x/bErIK5tuJmynmK57LI5ot NzzsTSR0Wt4VNuTacDxxcBNo2ZYmbE0h+Q9FXqqZy0U0ifKX02CDNluW5 RYJTadPfWfNrqkEGbM9iSd4TZr0BktET5/WMd5jJWTSjP8mwkv/aJYCwr AZtvamwaGe2Uf+W9IIOVXiY20UilXWczmFRDT26jc2yPv2tyUH4PSqMTe 2EBcMAsIPvv7aWRtXAKneYoCJk2CpEGFASo4RjQROWTcjDUqls7s43KO4 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10439"; a="293128792" X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="293128792" 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:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,237,1654585200"; d="scan'208";a="934296874" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by fmsmga005.fm.intel.com with ESMTP; 14 Aug 2022 16:04:33 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: dev@dpdk.org, Qi Zhang , Jie Wang Subject: [PATCH 55/70] net/ice/base: enable RSS support for L2TPv2 session ID Date: Mon, 15 Aug 2022 03:12:51 -0400 Message-Id: <20220815071306.2910599-56-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 Add L2TPv2 session ID field support for RSS. Enable L2TPv2 non-tunneled packet types for UDP protocol header bitmaps. Signed-off-by: Jie Wang Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flow.c | 12 ++++++++++++ drivers/net/ice/base/ice_flow.h | 14 ++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c index bdc51ca9d2..182fac08a9 100644 --- a/drivers/net/ice/base/ice_flow.c +++ b/drivers/net/ice/base/ice_flow.c @@ -38,6 +38,8 @@ #define ICE_FLOW_FLD_SZ_NAT_T_ESP_SPI 4 #define ICE_FLOW_FLD_SZ_VXLAN_VNI 4 #define ICE_FLOW_FLD_SZ_ECPRI_TP0_PC_ID 2 +#define ICE_FLOW_FLD_SZ_L2TPV2_SESS_ID 2 +#define ICE_FLOW_FLD_SZ_L2TPV2_LEN_SESS_ID 2 /* Describe properties of a protocol header field */ struct ice_flow_field_info { @@ -229,6 +231,14 @@ struct ice_flow_field_info ice_flds_info[ICE_FLOW_FIELD_IDX_MAX] = { /* ICE_FLOW_FIELD_IDX_UDP_ECPRI_TP0_PC_ID */ ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_UDP_ECPRI_TP0, 12, ICE_FLOW_FLD_SZ_ECPRI_TP0_PC_ID), + /* L2TPV2 */ + /* ICE_FLOW_FIELD_IDX_L2TPV2_SESS_ID */ + ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_L2TPV2, 12, + ICE_FLOW_FLD_SZ_L2TPV2_SESS_ID), + /* L2TPV2_LEN */ + /* ICE_FLOW_FIELD_IDX_L2TPV2_LEN_SESS_ID */ + ICE_FLOW_FLD_INFO(ICE_FLOW_SEG_HDR_L2TPV2, 14, + ICE_FLOW_FLD_SZ_L2TPV2_LEN_SESS_ID), }; /* Bitmaps indicating relevant packet types for a particular protocol header @@ -1492,6 +1502,8 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params, case ICE_FLOW_FIELD_IDX_GTPU_EH_QFI: case ICE_FLOW_FIELD_IDX_GTPU_UP_QFI: case ICE_FLOW_FIELD_IDX_GTPU_DWN_QFI: + case ICE_FLOW_FIELD_IDX_L2TPV2_SESS_ID: + case ICE_FLOW_FIELD_IDX_L2TPV2_LEN_SESS_ID: /* GTP is accessed through UDP OF protocol */ prot_id = ICE_PROT_UDP_OF; break; diff --git a/drivers/net/ice/base/ice_flow.h b/drivers/net/ice/base/ice_flow.h index f941ce4333..5729392362 100644 --- a/drivers/net/ice/base/ice_flow.h +++ b/drivers/net/ice/base/ice_flow.h @@ -149,6 +149,16 @@ #define ICE_FLOW_HASH_NAT_T_ESP_IPV6_SPI \ (ICE_FLOW_HASH_IPV6 | ICE_FLOW_HASH_NAT_T_ESP_SPI) +#define ICE_FLOW_HASH_L2TPV2_SESS_ID \ + (BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV2_SESS_ID)) +#define ICE_FLOW_HASH_L2TPV2_SESS_ID_ETH \ + (ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_L2TPV2_SESS_ID) + +#define ICE_FLOW_HASH_L2TPV2_LEN_SESS_ID \ + (BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV2_LEN_SESS_ID)) +#define ICE_FLOW_HASH_L2TPV2_LEN_SESS_ID_ETH \ + (ICE_FLOW_HASH_ETH | ICE_FLOW_HASH_L2TPV2_LEN_SESS_ID) + #define ICE_FLOW_FIELD_IPV4_SRC_OFFSET 12 #define ICE_FLOW_FIELD_IPV4_DST_OFFSET 16 #define ICE_FLOW_FIELD_IPV6_SRC_OFFSET 8 @@ -297,6 +307,10 @@ enum ice_flow_field { ICE_FLOW_FIELD_IDX_ECPRI_TP0_PC_ID, /* UDP_ECPRI_TP0 */ ICE_FLOW_FIELD_IDX_UDP_ECPRI_TP0_PC_ID, + /* L2TPV2 SESSION ID*/ + ICE_FLOW_FIELD_IDX_L2TPV2_SESS_ID, + /* L2TPV2_LEN SESSION ID */ + ICE_FLOW_FIELD_IDX_L2TPV2_LEN_SESS_ID, /* The total number of enums must not exceed 64 */ ICE_FLOW_FIELD_IDX_MAX }; -- 2.31.1