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 59F86A00BE; Fri, 12 Jun 2020 15:43:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D3811C031; Fri, 12 Jun 2020 15:34:34 +0200 (CEST) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id A702F1BFF8 for ; Fri, 12 Jun 2020 15:34:30 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 7C9D81BD7AC; Fri, 12 Jun 2020 06:34:29 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 7C9D81BD7AC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1591968870; bh=/7RYbzVkVWyeX7P97RIdv7yP0htJ4Hh/xMJZhDPHdTo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ikl67tf0RFock+t4NlwKeYps+G8kuwbbvpT09eLNtTz9IzSp/uuaHR8SYaopbjnWh C5DriN4ginns8Osh0Hotvkd0Sq0xYvinhGUuyKV8qi2JcxG3Mv90cth2yKt80GPTOq qdDiA/6uvLVu7O2+dVRv/sgDao+0S8JGNQ4ADYv0= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 12 Jun 2020 18:59:03 +0530 Message-Id: <20200612132934.16488-20-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200612132934.16488-1-somnath.kotur@broadcom.com> References: <20200612132934.16488-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 19/50] net/bnxt: update identifier with remap support 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" From: Michael Wildt - Add Identifier L2 CTXT Remap to the P4 device and updated the cfa_resource_types.h to get the type support. Signed-off-by: Michael Wildt Reviewed-by: Randy Schacher Reviewed-by: Ajit Kumar Khaparde Signed-off-by: Venkat Duvvuru --- drivers/net/bnxt/tf_core/cfa_resource_types.h | 110 ++++++++++++++------------ drivers/net/bnxt/tf_core/tf_device_p4.h | 2 +- 2 files changed, 60 insertions(+), 52 deletions(-) diff --git a/drivers/net/bnxt/tf_core/cfa_resource_types.h b/drivers/net/bnxt/tf_core/cfa_resource_types.h index 11e8892..058d8cc 100644 --- a/drivers/net/bnxt/tf_core/cfa_resource_types.h +++ b/drivers/net/bnxt/tf_core/cfa_resource_types.h @@ -20,46 +20,48 @@ /* L2 Context TCAM */ #define CFA_RESOURCE_TYPE_P59_L2_CTXT_TCAM 0x0UL +/* L2 Context REMAP */ +#define CFA_RESOURCE_TYPE_P59_L2_CTXT_REMAP 0x1UL /* Profile Func */ -#define CFA_RESOURCE_TYPE_P59_PROF_FUNC 0x1UL +#define CFA_RESOURCE_TYPE_P59_PROF_FUNC 0x2UL /* Profile TCAM */ -#define CFA_RESOURCE_TYPE_P59_PROF_TCAM 0x2UL +#define CFA_RESOURCE_TYPE_P59_PROF_TCAM 0x3UL /* Exact Match Profile Id */ -#define CFA_RESOURCE_TYPE_P59_EM_PROF_ID 0x3UL +#define CFA_RESOURCE_TYPE_P59_EM_PROF_ID 0x4UL /* Wildcard TCAM Profile Id */ -#define CFA_RESOURCE_TYPE_P59_WC_TCAM_PROF_ID 0x4UL +#define CFA_RESOURCE_TYPE_P59_WC_TCAM_PROF_ID 0x5UL /* Wildcard TCAM */ -#define CFA_RESOURCE_TYPE_P59_WC_TCAM 0x5UL +#define CFA_RESOURCE_TYPE_P59_WC_TCAM 0x6UL /* Meter Profile */ -#define CFA_RESOURCE_TYPE_P59_METER_PROF 0x6UL +#define CFA_RESOURCE_TYPE_P59_METER_PROF 0x7UL /* Meter */ -#define CFA_RESOURCE_TYPE_P59_METER 0x7UL +#define CFA_RESOURCE_TYPE_P59_METER 0x8UL /* Meter */ -#define CFA_RESOURCE_TYPE_P59_MIRROR 0x8UL +#define CFA_RESOURCE_TYPE_P59_MIRROR 0x9UL /* Source Properties TCAM */ -#define CFA_RESOURCE_TYPE_P59_SP_TCAM 0x9UL +#define CFA_RESOURCE_TYPE_P59_SP_TCAM 0xaUL /* Exact Match Flexible Key Builder */ -#define CFA_RESOURCE_TYPE_P59_EM_FKB 0xaUL +#define CFA_RESOURCE_TYPE_P59_EM_FKB 0xbUL /* Wildcard Flexible Key Builder */ -#define CFA_RESOURCE_TYPE_P59_WC_FKB 0xbUL +#define CFA_RESOURCE_TYPE_P59_WC_FKB 0xcUL /* Table Scope */ -#define CFA_RESOURCE_TYPE_P59_TBL_SCOPE 0xcUL +#define CFA_RESOURCE_TYPE_P59_TBL_SCOPE 0xdUL /* L2 Func */ -#define CFA_RESOURCE_TYPE_P59_L2_FUNC 0xdUL +#define CFA_RESOURCE_TYPE_P59_L2_FUNC 0xeUL /* EPOCH */ -#define CFA_RESOURCE_TYPE_P59_EPOCH 0xeUL +#define CFA_RESOURCE_TYPE_P59_EPOCH 0xfUL /* Metadata */ -#define CFA_RESOURCE_TYPE_P59_METADATA 0xfUL +#define CFA_RESOURCE_TYPE_P59_METADATA 0x10UL /* Connection Tracking Rule TCAM */ -#define CFA_RESOURCE_TYPE_P59_CT_RULE_TCAM 0x10UL +#define CFA_RESOURCE_TYPE_P59_CT_RULE_TCAM 0x11UL /* Range Profile */ -#define CFA_RESOURCE_TYPE_P59_RANGE_PROF 0x11UL +#define CFA_RESOURCE_TYPE_P59_RANGE_PROF 0x12UL /* Range */ -#define CFA_RESOURCE_TYPE_P59_RANGE 0x12UL +#define CFA_RESOURCE_TYPE_P59_RANGE 0x13UL /* Link Aggrigation */ -#define CFA_RESOURCE_TYPE_P59_LAG 0x13UL +#define CFA_RESOURCE_TYPE_P59_LAG 0x14UL /* VEB TCAM */ -#define CFA_RESOURCE_TYPE_P59_VEB_TCAM 0x14UL +#define CFA_RESOURCE_TYPE_P59_VEB_TCAM 0x15UL #define CFA_RESOURCE_TYPE_P59_LAST CFA_RESOURCE_TYPE_P59_VEB_TCAM @@ -105,30 +107,32 @@ #define CFA_RESOURCE_TYPE_P58_FORMAT_4_ACTION 0x13UL /* L2 Context TCAM */ #define CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM 0x14UL +/* L2 Context REMAP */ +#define CFA_RESOURCE_TYPE_P58_L2_CTXT_REMAP 0x15UL /* Profile Func */ -#define CFA_RESOURCE_TYPE_P58_PROF_FUNC 0x15UL +#define CFA_RESOURCE_TYPE_P58_PROF_FUNC 0x16UL /* Profile TCAM */ -#define CFA_RESOURCE_TYPE_P58_PROF_TCAM 0x16UL +#define CFA_RESOURCE_TYPE_P58_PROF_TCAM 0x17UL /* Exact Match Profile Id */ -#define CFA_RESOURCE_TYPE_P58_EM_PROF_ID 0x17UL +#define CFA_RESOURCE_TYPE_P58_EM_PROF_ID 0x18UL /* Wildcard Profile Id */ -#define CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID 0x18UL +#define CFA_RESOURCE_TYPE_P58_WC_TCAM_PROF_ID 0x19UL /* Exact Match Record */ -#define CFA_RESOURCE_TYPE_P58_EM_REC 0x19UL +#define CFA_RESOURCE_TYPE_P58_EM_REC 0x1aUL /* Wildcard TCAM */ -#define CFA_RESOURCE_TYPE_P58_WC_TCAM 0x1aUL +#define CFA_RESOURCE_TYPE_P58_WC_TCAM 0x1bUL /* Meter profile */ -#define CFA_RESOURCE_TYPE_P58_METER_PROF 0x1bUL +#define CFA_RESOURCE_TYPE_P58_METER_PROF 0x1cUL /* Meter */ -#define CFA_RESOURCE_TYPE_P58_MIRROR 0x1cUL +#define CFA_RESOURCE_TYPE_P58_MIRROR 0x1dUL /* Source Property TCAM */ -#define CFA_RESOURCE_TYPE_P58_SP_TCAM 0x1dUL +#define CFA_RESOURCE_TYPE_P58_SP_TCAM 0x1eUL /* Exact Match Flexible Key Builder */ -#define CFA_RESOURCE_TYPE_P58_EM_FKB 0x1eUL +#define CFA_RESOURCE_TYPE_P58_EM_FKB 0x1fUL /* Wildcard Flexible Key Builder */ -#define CFA_RESOURCE_TYPE_P58_WC_FKB 0x1fUL +#define CFA_RESOURCE_TYPE_P58_WC_FKB 0x20UL /* VEB TCAM */ -#define CFA_RESOURCE_TYPE_P58_VEB_TCAM 0x20UL +#define CFA_RESOURCE_TYPE_P58_VEB_TCAM 0x21UL #define CFA_RESOURCE_TYPE_P58_LAST CFA_RESOURCE_TYPE_P58_VEB_TCAM @@ -176,26 +180,28 @@ #define CFA_RESOURCE_TYPE_P45_FORMAT_4_ACTION 0x14UL /* L2 Context TCAM */ #define CFA_RESOURCE_TYPE_P45_L2_CTXT_TCAM 0x15UL +/* L2 Context REMAP */ +#define CFA_RESOURCE_TYPE_P45_L2_CTXT_REMAP 0x16UL /* Profile Func */ -#define CFA_RESOURCE_TYPE_P45_PROF_FUNC 0x16UL +#define CFA_RESOURCE_TYPE_P45_PROF_FUNC 0x17UL /* Profile TCAM */ -#define CFA_RESOURCE_TYPE_P45_PROF_TCAM 0x17UL +#define CFA_RESOURCE_TYPE_P45_PROF_TCAM 0x18UL /* Exact Match Profile Id */ -#define CFA_RESOURCE_TYPE_P45_EM_PROF_ID 0x18UL +#define CFA_RESOURCE_TYPE_P45_EM_PROF_ID 0x19UL /* Exact Match Record */ -#define CFA_RESOURCE_TYPE_P45_EM_REC 0x19UL +#define CFA_RESOURCE_TYPE_P45_EM_REC 0x1aUL /* Wildcard Profile Id */ -#define CFA_RESOURCE_TYPE_P45_WC_TCAM_PROF_ID 0x1aUL +#define CFA_RESOURCE_TYPE_P45_WC_TCAM_PROF_ID 0x1bUL /* Wildcard TCAM */ -#define CFA_RESOURCE_TYPE_P45_WC_TCAM 0x1bUL +#define CFA_RESOURCE_TYPE_P45_WC_TCAM 0x1cUL /* Meter profile */ -#define CFA_RESOURCE_TYPE_P45_METER_PROF 0x1cUL +#define CFA_RESOURCE_TYPE_P45_METER_PROF 0x1dUL /* Meter */ -#define CFA_RESOURCE_TYPE_P45_MIRROR 0x1dUL +#define CFA_RESOURCE_TYPE_P45_MIRROR 0x1eUL /* Source Property TCAM */ -#define CFA_RESOURCE_TYPE_P45_SP_TCAM 0x1eUL +#define CFA_RESOURCE_TYPE_P45_SP_TCAM 0x1fUL /* VEB TCAM */ -#define CFA_RESOURCE_TYPE_P45_VEB_TCAM 0x1fUL +#define CFA_RESOURCE_TYPE_P45_VEB_TCAM 0x20UL #define CFA_RESOURCE_TYPE_P45_LAST CFA_RESOURCE_TYPE_P45_VEB_TCAM @@ -243,24 +249,26 @@ #define CFA_RESOURCE_TYPE_P4_FORMAT_4_ACTION 0x14UL /* L2 Context TCAM */ #define CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM 0x15UL +/* L2 Context REMAP */ +#define CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP 0x16UL /* Profile Func */ -#define CFA_RESOURCE_TYPE_P4_PROF_FUNC 0x16UL +#define CFA_RESOURCE_TYPE_P4_PROF_FUNC 0x17UL /* Profile TCAM */ -#define CFA_RESOURCE_TYPE_P4_PROF_TCAM 0x17UL +#define CFA_RESOURCE_TYPE_P4_PROF_TCAM 0x18UL /* Exact Match Profile Id */ -#define CFA_RESOURCE_TYPE_P4_EM_PROF_ID 0x18UL +#define CFA_RESOURCE_TYPE_P4_EM_PROF_ID 0x19UL /* Exact Match Record */ -#define CFA_RESOURCE_TYPE_P4_EM_REC 0x19UL +#define CFA_RESOURCE_TYPE_P4_EM_REC 0x1aUL /* Wildcard Profile Id */ -#define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID 0x1aUL +#define CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID 0x1bUL /* Wildcard TCAM */ -#define CFA_RESOURCE_TYPE_P4_WC_TCAM 0x1bUL +#define CFA_RESOURCE_TYPE_P4_WC_TCAM 0x1cUL /* Meter profile */ -#define CFA_RESOURCE_TYPE_P4_METER_PROF 0x1cUL +#define CFA_RESOURCE_TYPE_P4_METER_PROF 0x1dUL /* Meter */ -#define CFA_RESOURCE_TYPE_P4_MIRROR 0x1dUL +#define CFA_RESOURCE_TYPE_P4_MIRROR 0x1eUL /* Source Property TCAM */ -#define CFA_RESOURCE_TYPE_P4_SP_TCAM 0x1eUL +#define CFA_RESOURCE_TYPE_P4_SP_TCAM 0x1fUL #define CFA_RESOURCE_TYPE_P4_LAST CFA_RESOURCE_TYPE_P4_SP_TCAM diff --git a/drivers/net/bnxt/tf_core/tf_device_p4.h b/drivers/net/bnxt/tf_core/tf_device_p4.h index 5cd02b2..235d81f 100644 --- a/drivers/net/bnxt/tf_core/tf_device_p4.h +++ b/drivers/net/bnxt/tf_core/tf_device_p4.h @@ -12,7 +12,7 @@ #include "tf_rm_new.h" struct tf_rm_element_cfg tf_ident_p4[TF_IDENT_TYPE_MAX] = { - { TF_RM_ELEM_CFG_PRIVATE, CFA_RESOURCE_TYPE_INVALID }, + { TF_RM_ELEM_CFG_HCAPI, CFA_RESOURCE_TYPE_P4_L2_CTXT_REMAP }, { TF_RM_ELEM_CFG_HCAPI, CFA_RESOURCE_TYPE_P4_PROF_FUNC }, { TF_RM_ELEM_CFG_HCAPI, CFA_RESOURCE_TYPE_P4_WC_TCAM_PROF_ID }, { TF_RM_ELEM_CFG_HCAPI, CFA_RESOURCE_TYPE_P4_EM_PROF_ID }, -- 2.7.4