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 1D4BA45C9A; Thu, 7 Nov 2024 14:43:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6C9542F9D; Thu, 7 Nov 2024 14:43:01 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id 33C7A42F87 for ; Thu, 7 Nov 2024 14:43:00 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2e56df894d4so746544a91.3 for ; Thu, 07 Nov 2024 05:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1730986979; x=1731591779; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3MQz7o1d09gT0KPJlNiOBRHF6QS3EvEc0M4lTeKEZR0=; b=KDEB62bNeBXEe+5PVimpYL5tkZqqWqAvytizLMuJh+/M2ddrkDp56TnQ6MuSX+y3Xr eWLpZaTTYjqBVCMxRhGM31TIshvG/llUacVCUJEpN+Ij98byMIgGbSRhNYwPoOryyHCf NmvqLNaXkLJkhfQfYlDsCSvdakVToY0OLnufQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730986979; x=1731591779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3MQz7o1d09gT0KPJlNiOBRHF6QS3EvEc0M4lTeKEZR0=; b=BifUl4HwVlZb7cKNjkiLDIy5rSN0ldIcLXyHxl+0qlFiIT2zwXGay2/d5gSg1Xya1T ne4Zdel5M9NouSnLwpivrJeXz+LplIFNhcTw84v5E0KW9j5qXFywmlrJtnNTpsfueScR IUm7wV00n4vVpfsQ3QgBnLx4Ai+oX0Jm9Axdq9gdl6r9oFxZ+TyIthabhNUIkZzXEezU 1tu9MkNJi5AK1H18XC0nk0eJhpurCNBRS4zRnIGk6LEGSdhffTEG4naWSJPS4s8tsLwm R5ulw2bRj/x9B+QRtbRQ2qXzWte8LigvXesXkkBaACV6OL0fnL001/cEFX5/27wAGyGX Oqhg== X-Gm-Message-State: AOJu0YxPUg/P8xnUb5gFao+AJsaD2ZMxejRIY+ExgzEcZj+c1Hvx2m8d P+nXPtZ2T5jclmxfNe1+rZTt+gxc8xk+6NO4JJTf3cJtAsgncc5W3Vt2U6B6cmOxH5ATpnSoNMu GguBT33ir3jNX3aTb/UhRvLGvgiMNmjfW1q4Yu5x+wctXlC0cGfyltoLYoH0QXOJGLq4pirR/k3 TAKvWr/JH3k3vKb1wYn5BJfJfEph5Ri9VKzfmG+kMhww== X-Google-Smtp-Source: AGHT+IHWyR7XFjPNhS5/vy/uZObir4mlsYIWl6/IYdGmoh44P/uu2DeK/wcuETqvPoBv62adllTsCQ== X-Received: by 2002:a17:90b:2791:b0:2e2:d821:1b78 with SMTP id 98e67ed59e1d1-2e9af443df6mr114511a91.0.1730986978502; Thu, 07 Nov 2024 05:42:58 -0800 (PST) Received: from dhcp-10-123-154-23.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9a5f52969sm1409878a91.2.2024.11.07.05.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 05:42:58 -0800 (PST) From: Sriharsha Basavapatna To: dev@dpdk.org Cc: Randy Schacher , Sriharsha Basavapatna , Peter Spreadborough , Manish Kurup , Farah Smith , Ajit Khaparde Subject: [PATCH v8 10/47] net/bnxt: tf_core: remove dead code from session-based priority TCAM mgr Date: Thu, 7 Nov 2024 19:22:17 +0530 Message-Id: <20241107135254.1611676-11-sriharsha.basavapatna@broadcom.com> X-Mailer: git-send-email 2.39.0.189.g4dbebc36b0 In-Reply-To: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.com> References: <20241107135254.1611676-1-sriharsha.basavapatna@broadcom.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 From: Randy Schacher Remove references to tx_tcam_supported and rx_tcam_supported logic which chooses between FW-based tcam resource allocation and driver-based tcam manager. Signed-off-by: Randy Schacher Signed-off-by: Sriharsha Basavapatna Reviewed-by: Peter Spreadborough Reviewed-by: Manish Kurup Reviewed-by: Farah Smith Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_core/cfa_tcam_mgr.c | 46 ---- drivers/net/bnxt/tf_core/cfa_tcam_mgr.h | 29 -- drivers/net/bnxt/tf_core/tf_session.h | 5 - drivers/net/bnxt/tf_core/tf_tcam.c | 294 +-------------------- drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c | 28 -- drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h | 6 - 6 files changed, 8 insertions(+), 400 deletions(-) diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c index 7a68f61997..89ca6814e5 100644 --- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c +++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c @@ -1072,52 +1072,6 @@ cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type, return 0; } -int -cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused, - struct cfa_tcam_mgr_qcaps_parms *parms) -{ - struct cfa_tcam_mgr_data *tcam_mgr_data; - struct tf_session *tfs; - unsigned int type; - int rc; - - CFA_TCAM_MGR_CHECK_PARMS2(tfp, parms); - - rc = tf_session_get_session_internal(tfp, &tfs); - if (rc) - return rc; - - tcam_mgr_data = tfs->tcam_mgr_handle; - if (!tcam_mgr_data) { - CFA_TCAM_MGR_LOG_0(ERR, "No TCAM data created for session.\n"); - return -CFA_TCAM_MGR_ERR_CODE(PERM); - } - - /* - * This code will indicate if TCAM Manager is managing a logical TCAM - * table or not. If not, then the physical TCAM will have to be - * accessed using the traditional methods. - */ - parms->rx_tcam_supported = 0; - parms->tx_tcam_supported = 0; - for (type = 0; type < CFA_TCAM_MGR_TBL_TYPE_MAX; type++) { - if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX] - [type].max_entries > 0 && - tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX] - [type].hcapi_type > 0) - parms->rx_tcam_supported |= - 1 << cfa_tcam_mgr_get_phys_table_type(type); - if (tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX] - [type].max_entries > 0 && - tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX] - [type].hcapi_type > 0) - parms->tx_tcam_supported |= - 1 << cfa_tcam_mgr_get_phys_table_type(type); - } - - return 0; -} - static int cfa_tcam_mgr_validate_tcam_cnt(struct tf *tfp __rte_unused, struct cfa_tcam_mgr_data *tcam_mgr_data, diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h index e1a691b775..6ac1156fbf 100644 --- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h +++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h @@ -113,18 +113,6 @@ struct cfa_tcam_mgr_init_parms { uint32_t max_entries; }; -/** - * TCAM Manager initialization parameters - */ -struct cfa_tcam_mgr_qcaps_parms { - /** - * [out] Bitmasks. Set if TCAM Manager is managing a logical TCAM. - * Each bitmask is indexed by logical TCAM table ID. - */ - uint32_t rx_tcam_supported; - uint32_t tx_tcam_supported; -}; - /** * TCAM Manager configuration parameters */ @@ -360,23 +348,6 @@ cfa_tcam_mgr_init(struct tf *tfp, enum cfa_tcam_mgr_device_type type, int cfa_tcam_mgr_get_phys_table_type(enum cfa_tcam_mgr_tbl_type type); -/** - * Queries the capabilities of TCAM Manager. - * - * [in] context - * Pointer to context information - * - * [out] parms - * Pointer to parameters to be returned - * - * Returns - * - (0) if successful. - * - (<0) on failure. - */ -int -cfa_tcam_mgr_qcaps(struct tf *tfp __rte_unused, - struct cfa_tcam_mgr_qcaps_parms *parms); - /** * Initializes the TCAM module with the requested DBs. Must be * invoked as the first thing before any of the access functions. diff --git a/drivers/net/bnxt/tf_core/tf_session.h b/drivers/net/bnxt/tf_core/tf_session.h index d46d89e9e9..7668e9d0e0 100644 --- a/drivers/net/bnxt/tf_core/tf_session.h +++ b/drivers/net/bnxt/tf_core/tf_session.h @@ -174,11 +174,6 @@ struct tf_session { */ uint16_t wc_num_slices_per_row; - /** - * Indicates if TCAM is controlled by TCAM Manager - */ - int tcam_mgr_control[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX]; - /** * TCAM Manager handle pointing to session based tcam memory */ diff --git a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c index fa8f60777d..e9bff62f88 100644 --- a/drivers/net/bnxt/tf_core/tf_tcam.c +++ b/drivers/net/bnxt/tf_core/tf_tcam.c @@ -37,9 +37,6 @@ tf_tcam_bind(struct tf *tfp, struct tcam_rm_db *tcam_db; struct tfp_calloc_parms cparms; struct tf_resource_info resv_res[TF_DIR_MAX][TF_TCAM_TBL_TYPE_MAX]; - uint32_t rx_supported; - uint32_t tx_supported; - bool no_req = true; TF_CHECK_PARMS2(tfp, parms); @@ -167,39 +164,16 @@ tf_tcam_bind(struct tf *tfp, if (rc) return rc; - rc = tf_tcam_mgr_qcaps_msg(tfp, dev, - &rx_supported, &tx_supported); - if (rc) - return rc; - - for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++) { - if (rx_supported & 1 << t) - tfs->tcam_mgr_control[TF_DIR_RX][t] = 1; - if (tx_supported & 1 << t) - tfs->tcam_mgr_control[TF_DIR_TX][t] = 1; - } - /* * Make a local copy of tcam_cnt with only resources not managed by TCAM * Manager requested. */ memcpy(&local_tcam_cnt, tcam_cnt, sizeof(local_tcam_cnt)); tcam_cnt = local_tcam_cnt; - for (d = 0; d < TF_DIR_MAX; d++) { - for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++) { - /* If controlled by TCAM Manager */ - if (tfs->tcam_mgr_control[d][t]) - tcam_cnt[d].cnt[t] = 0; - else if (tcam_cnt[d].cnt[t] > 0) - no_req = false; - } - } - - /* If no resources left to request */ - if (no_req) - goto finished; + for (d = 0; d < TF_DIR_MAX; d++) + for (t = 0; t < TF_TCAM_TBL_TYPE_MAX; t++) + tcam_cnt[d].cnt[t] = 0; -finished: TFP_DRV_LOG(INFO, "TCAM - initialized\n"); @@ -274,14 +248,10 @@ int tf_tcam_alloc(struct tf *tfp, struct tf_tcam_alloc_parms *parms) { - int rc, i; + int rc; struct tf_session *tfs; struct tf_dev_info *dev; - struct tf_rm_allocate_parms aparms; uint16_t num_slices = 1; - uint32_t index; - struct tcam_rm_db *tcam_db; - void *tcam_db_ptr = NULL; TF_CHECK_PARMS2(tfp, parms); @@ -312,43 +282,7 @@ tf_tcam_alloc(struct tf *tfp, if (rc) return rc; - /* If TCAM controlled by TCAM Manager */ - if (tfs->tcam_mgr_control[parms->dir][parms->type]) - return tf_tcam_mgr_alloc_msg(tfp, dev, parms); - rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr); - if (rc) { - TFP_DRV_LOG(ERR, - "Failed to get tcam_db from session, rc:%s\n", - strerror(-rc)); - return rc; - } - tcam_db = (struct tcam_rm_db *)tcam_db_ptr; - - /* - * For WC TCAM, number of slices could be 4, 2, 1 based on - * the key_size. For other TCAM, it is always 1 - */ - for (i = 0; i < num_slices; i++) { - memset(&aparms, 0, sizeof(aparms)); - aparms.rm_db = tcam_db->tcam_db[parms->dir]; - aparms.subtype = parms->type; - aparms.priority = parms->priority; - aparms.index = &index; - rc = tf_rm_allocate(&aparms); - if (rc) { - TFP_DRV_LOG(ERR, - "%s: Failed tcam, type:%d\n", - tf_dir_2_str(parms->dir), - parms->type); - return rc; - } - - /* return the start index of each row */ - if (i == 0) - parms->idx = index; - } - - return 0; + return tf_tcam_mgr_alloc_msg(tfp, dev, parms); } int @@ -358,14 +292,7 @@ tf_tcam_free(struct tf *tfp, int rc; struct tf_session *tfs; struct tf_dev_info *dev; - struct tf_rm_is_allocated_parms aparms; - struct tf_rm_free_parms fparms; - struct tf_rm_get_hcapi_parms hparms; uint16_t num_slices = 1; - int allocated = 0; - int i; - struct tcam_rm_db *tcam_db; - void *tcam_db_ptr = NULL; TF_CHECK_PARMS2(tfp, parms); @@ -396,91 +323,7 @@ tf_tcam_free(struct tf *tfp, if (rc) return rc; - /* If TCAM controlled by TCAM Manager */ - if (tfs->tcam_mgr_control[parms->dir][parms->type]) - /* - * If a session can have multiple references to an entry, check - * the reference count here before actually freeing the entry. - */ - return tf_tcam_mgr_free_msg(tfp, dev, parms); - - if (parms->idx % num_slices) { - TFP_DRV_LOG(ERR, - "%s: TCAM reserved resource is not multiple of %d\n", - tf_dir_2_str(parms->dir), - num_slices); - return -EINVAL; - } - - rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr); - if (rc) { - TFP_DRV_LOG(ERR, - "Failed to get em_ext_db from session, rc:%s\n", - strerror(-rc)); - return rc; - } - tcam_db = (struct tcam_rm_db *)tcam_db_ptr; - - /* Check if element is in use */ - memset(&aparms, 0, sizeof(aparms)); - aparms.rm_db = tcam_db->tcam_db[parms->dir]; - aparms.subtype = parms->type; - aparms.index = parms->idx; - aparms.allocated = &allocated; - rc = tf_rm_is_allocated(&aparms); - if (rc) - return rc; - - if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) { - TFP_DRV_LOG(ERR, - "%s: Entry already free, type:%d, index:%d\n", - tf_dir_2_str(parms->dir), - parms->type, - parms->idx); - return -EINVAL; - } - - for (i = 0; i < num_slices; i++) { - /* Free requested element */ - memset(&fparms, 0, sizeof(fparms)); - fparms.rm_db = tcam_db->tcam_db[parms->dir]; - fparms.subtype = parms->type; - fparms.index = parms->idx + i; - rc = tf_rm_free(&fparms); - if (rc) { - TFP_DRV_LOG(ERR, - "%s: Free failed, type:%d, index:%d\n", - tf_dir_2_str(parms->dir), - parms->type, - parms->idx); - return rc; - } - } - - /* Convert TF type to HCAPI RM type */ - memset(&hparms, 0, sizeof(hparms)); - - hparms.rm_db = tcam_db->tcam_db[parms->dir]; - hparms.subtype = parms->type; - hparms.hcapi_type = &parms->hcapi_type; - - rc = tf_rm_get_hcapi_type(&hparms); - if (rc) - return rc; - - rc = tf_msg_tcam_entry_free(tfp, dev, parms); - if (rc) { - /* Log error */ - TFP_DRV_LOG(ERR, - "%s: %s: Entry %d free failed, rc:%s\n", - tf_dir_2_str(parms->dir), - tf_tcam_tbl_2_str(parms->type), - parms->idx, - strerror(-rc)); - return rc; - } - - return 0; + return tf_tcam_mgr_free_msg(tfp, dev, parms); } int @@ -490,12 +333,7 @@ tf_tcam_set(struct tf *tfp __rte_unused, int rc; struct tf_session *tfs; struct tf_dev_info *dev; - struct tf_rm_is_allocated_parms aparms; - struct tf_rm_get_hcapi_parms hparms; uint16_t num_slice_per_row = 1; - int allocated = 0; - struct tcam_rm_db *tcam_db; - void *tcam_db_ptr = NULL; TF_CHECK_PARMS2(tfp, parms); @@ -526,62 +364,7 @@ tf_tcam_set(struct tf *tfp __rte_unused, if (rc) return rc; - /* If TCAM controlled by TCAM Manager */ - if (tfs->tcam_mgr_control[parms->dir][parms->type]) - return tf_tcam_mgr_set_msg(tfp, dev, parms); - - rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr); - if (rc) { - TFP_DRV_LOG(ERR, - "Failed to get em_ext_db from session, rc:%s\n", - strerror(-rc)); - return rc; - } - tcam_db = (struct tcam_rm_db *)tcam_db_ptr; - - /* Check if element is in use */ - memset(&aparms, 0, sizeof(aparms)); - - aparms.rm_db = tcam_db->tcam_db[parms->dir]; - aparms.subtype = parms->type; - aparms.index = parms->idx; - aparms.allocated = &allocated; - rc = tf_rm_is_allocated(&aparms); - if (rc) - return rc; - - if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) { - TFP_DRV_LOG(ERR, - "%s: Entry is not allocated, type:%d, index:%d\n", - tf_dir_2_str(parms->dir), - parms->type, - parms->idx); - return -EINVAL; - } - - /* Convert TF type to HCAPI RM type */ - memset(&hparms, 0, sizeof(hparms)); - - hparms.rm_db = tcam_db->tcam_db[parms->dir]; - hparms.subtype = parms->type; - hparms.hcapi_type = &parms->hcapi_type; - - rc = tf_rm_get_hcapi_type(&hparms); - if (rc) - return rc; - - rc = tf_msg_tcam_entry_set(tfp, dev, parms); - if (rc) { - /* Log error */ - TFP_DRV_LOG(ERR, - "%s: %s: Entry %d set failed, rc:%s", - tf_dir_2_str(parms->dir), - tf_tcam_tbl_2_str(parms->type), - parms->idx, - strerror(-rc)); - return rc; - } - return 0; + return tf_tcam_mgr_set_msg(tfp, dev, parms); } int @@ -591,11 +374,6 @@ tf_tcam_get(struct tf *tfp __rte_unused, int rc; struct tf_session *tfs; struct tf_dev_info *dev; - struct tf_rm_is_allocated_parms aparms; - struct tf_rm_get_hcapi_parms hparms; - int allocated = 0; - struct tcam_rm_db *tcam_db; - void *tcam_db_ptr = NULL; TF_CHECK_PARMS2(tfp, parms); @@ -609,63 +387,7 @@ tf_tcam_get(struct tf *tfp __rte_unused, if (rc) return rc; - /* If TCAM controlled by TCAM Manager */ - if (tfs->tcam_mgr_control[parms->dir][parms->type]) - return tf_tcam_mgr_get_msg(tfp, dev, parms); - - rc = tf_session_get_db(tfp, TF_MODULE_TYPE_TCAM, &tcam_db_ptr); - if (rc) { - TFP_DRV_LOG(ERR, - "Failed to get em_ext_db from session, rc:%s\n", - strerror(-rc)); - return rc; - } - tcam_db = (struct tcam_rm_db *)tcam_db_ptr; - - /* Check if element is in use */ - memset(&aparms, 0, sizeof(aparms)); - - aparms.rm_db = tcam_db->tcam_db[parms->dir]; - aparms.subtype = parms->type; - aparms.index = parms->idx; - aparms.allocated = &allocated; - rc = tf_rm_is_allocated(&aparms); - if (rc) - return rc; - - if (allocated != TF_RM_ALLOCATED_ENTRY_IN_USE) { - TFP_DRV_LOG(ERR, - "%s: Entry is not allocated, type:%d, index:%d\n", - tf_dir_2_str(parms->dir), - parms->type, - parms->idx); - return -EINVAL; - } - - /* Convert TF type to HCAPI RM type */ - memset(&hparms, 0, sizeof(hparms)); - - hparms.rm_db = tcam_db->tcam_db[parms->dir]; - hparms.subtype = parms->type; - hparms.hcapi_type = &parms->hcapi_type; - - rc = tf_rm_get_hcapi_type(&hparms); - if (rc) - return rc; - - rc = tf_msg_tcam_entry_get(tfp, dev, parms); - if (rc) { - /* Log error */ - TFP_DRV_LOG(ERR, - "%s: %s: Entry %d set failed, rc:%s", - tf_dir_2_str(parms->dir), - tf_tcam_tbl_2_str(parms->type), - parms->idx, - strerror(-rc)); - return rc; - } - - return 0; + return tf_tcam_mgr_get_msg(tfp, dev, parms); } int diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c index 8cf4d4d1fb..9e5d39fde5 100644 --- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c +++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c @@ -38,34 +38,6 @@ static enum cfa_tcam_mgr_tbl_type tcam_types[TF_TCAM_TBL_TYPE_MAX] = { static uint16_t hcapi_type[TF_TCAM_TBL_TYPE_MAX]; -/* - * This is the glue between the core tf_tcam and the TCAM manager. It is - * intended to abstract out the location of the TCAM manager so that the core - * code will be the same if the TCAM manager is in the core or in firmware. - * - * If the TCAM manager is in the core, then this file will just translate to - * TCAM manager APIs. If TCAM manager is in firmware, then this file will cause - * messages to be sent (except for bind and unbind). - */ - -int -tf_tcam_mgr_qcaps_msg(struct tf *tfp, - struct tf_dev_info *dev __rte_unused, - uint32_t *rx_tcam_supported, - uint32_t *tx_tcam_supported) -{ - struct cfa_tcam_mgr_qcaps_parms mgr_parms; - int rc; - - memset(&mgr_parms, 0, sizeof(mgr_parms)); - rc = cfa_tcam_mgr_qcaps(tfp, &mgr_parms); - if (rc >= 0) { - *rx_tcam_supported = mgr_parms.rx_tcam_supported; - *tx_tcam_supported = mgr_parms.tx_tcam_supported; - } - return rc; -} - int tf_tcam_mgr_bind_msg(struct tf *tfp, struct tf_dev_info *dev __rte_unused, diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h index 8a8d136f5e..eb4617049a 100644 --- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h +++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.h @@ -9,12 +9,6 @@ #include "tf_tcam.h" #include "tf_rm.h" -int -tf_tcam_mgr_qcaps_msg(struct tf *tfp, - struct tf_dev_info *dev __rte_unused, - uint32_t *rx_tcam_supported, - uint32_t *tx_tcam_supported); - int tf_tcam_mgr_bind_msg(struct tf *tfp, struct tf_dev_info *dev, -- 2.39.3