From patchwork Wed Jul 1 06:51:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 72542 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0883A0350; Wed, 1 Jul 2020 08:56:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5C1B31C2F7; Wed, 1 Jul 2020 08:52:46 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 99B321C0B7 for ; Wed, 1 Jul 2020 08:52:22 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id E591430C324; Tue, 30 Jun 2020 23:52:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E591430C324 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1593586341; bh=3c1k75JRPQJ2PH9yAHZYf9avS1RyuGNWGQowlei3urA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fe9UGSb16Gtl8hRZiMENh4D8+/SGr2USbvyA1MUyo6E38AUx6U9uuV1bfiTBTCrYM xS9vtDHQ/evD3yT0qWVko0zlGGvA6tEJw4fjKepL5tyLRB7zu/PxUI6+iMDzJhqwix yUXCU0ibxK5p/F3qkusXdCXfcl4+hoUS2SuQZzRo= Received: from localhost.localdomain (unknown [10.230.185.215]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id BD49E14008B; Tue, 30 Jun 2020 23:52:21 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: Michael Wildt , Venkat Duvvuru , Randy Schacher Date: Tue, 30 Jun 2020 23:51:40 -0700 Message-Id: <20200701065212.41391-20-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200701065212.41391-1-ajit.khaparde@broadcom.com> References: <20200612132934.16488-1-somnath.kotur@broadcom.com> <20200701065212.41391-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 19/51] 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 Signed-off-by: Venkat Duvvuru Reviewed-by: Randy Schacher Reviewed-by: Ajit Khaparde --- 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 11e8892f4..058d8cc88 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 5cd02b298..235d81f96 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 },