From patchwork Wed Jun 7 13:02:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 128291 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FC2142C4D; Wed, 7 Jun 2023 15:03:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFA5D427F5; Wed, 7 Jun 2023 15:02:49 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 5A692410D7 for ; Wed, 7 Jun 2023 15:02:47 +0200 (CEST) Received: from localhost.localdomain (unknown [78.109.69.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by agw.arknetworks.am (Postfix) with ESMTPSA id BFE39E1253; Wed, 7 Jun 2023 17:02:46 +0400 (+04) From: Ivan Malov To: dev@dpdk.org Cc: Andrew Rybchenko , Ferruh Yigit , Denis Pryazhennikov , Andy Moreton Subject: [PATCH v4 02/34] common/sfc_efx/base: detect MCDI Table Access API support Date: Wed, 7 Jun 2023 17:02:13 +0400 Message-Id: <20230607130245.8048-3-ivan.malov@arknetworks.am> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230607130245.8048-1-ivan.malov@arknetworks.am> References: <20230601195538.8265-1-ivan.malov@arknetworks.am> <20230607130245.8048-1-ivan.malov@arknetworks.am> MIME-Version: 1.0 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: Denis Pryazhennikov Future patches will add an implementation of MCDI Table Access API in libefx. This patch adds a way to determine if this API is supported. Signed-off-by: Denis Pryazhennikov Reviewed-by: Ivan Malov Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx.h | 2 ++ drivers/common/sfc_efx/base/hunt_nic.c | 2 ++ drivers/common/sfc_efx/base/medford2_nic.c | 2 ++ drivers/common/sfc_efx/base/medford_nic.c | 2 ++ drivers/common/sfc_efx/base/rhead_nic.c | 9 +++++++++ drivers/common/sfc_efx/base/siena_nic.c | 2 ++ 6 files changed, 19 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index f4fa88f169..520674a602 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -1672,6 +1672,8 @@ typedef struct efx_nic_cfg_s { boolean_t enc_mae_admin; /* NIC support for MAE action set v2 features. */ boolean_t enc_mae_aset_v2_supported; + /* NIC support for MCDI Table Access API. */ + boolean_t enc_table_api_supported; /* Firmware support for "FLAG" and "MARK" filter actions */ boolean_t enc_filter_action_flag_supported; boolean_t enc_filter_action_mark_supported; diff --git a/drivers/common/sfc_efx/base/hunt_nic.c b/drivers/common/sfc_efx/base/hunt_nic.c index 08ae324482..04595a39c8 100644 --- a/drivers/common/sfc_efx/base/hunt_nic.c +++ b/drivers/common/sfc_efx/base/hunt_nic.c @@ -192,6 +192,8 @@ hunt_board_cfg( /* All Huntington devices have a PCIe Gen3, 8 lane connector */ encp->enc_max_pcie_link_gen = EFX_PCIE_LINK_SPEED_GEN3; + encp->enc_table_api_supported = B_FALSE; + return (0); fail4: diff --git a/drivers/common/sfc_efx/base/medford2_nic.c b/drivers/common/sfc_efx/base/medford2_nic.c index 6d19524573..49adabffb2 100644 --- a/drivers/common/sfc_efx/base/medford2_nic.c +++ b/drivers/common/sfc_efx/base/medford2_nic.c @@ -152,6 +152,8 @@ medford2_board_cfg( encp->enc_required_pcie_bandwidth_mbps = bandwidth; encp->enc_max_pcie_link_gen = EFX_PCIE_LINK_SPEED_GEN3; + encp->enc_table_api_supported = B_FALSE; + return (0); fail4: diff --git a/drivers/common/sfc_efx/base/medford_nic.c b/drivers/common/sfc_efx/base/medford_nic.c index b111e3eded..9a460b2b9b 100644 --- a/drivers/common/sfc_efx/base/medford_nic.c +++ b/drivers/common/sfc_efx/base/medford_nic.c @@ -150,6 +150,8 @@ medford_board_cfg( encp->enc_required_pcie_bandwidth_mbps = bandwidth; encp->enc_max_pcie_link_gen = EFX_PCIE_LINK_SPEED_GEN3; + encp->enc_table_api_supported = B_FALSE; + return (0); fail4: diff --git a/drivers/common/sfc_efx/base/rhead_nic.c b/drivers/common/sfc_efx/base/rhead_nic.c index eda6c1c4f9..a773aea38d 100644 --- a/drivers/common/sfc_efx/base/rhead_nic.c +++ b/drivers/common/sfc_efx/base/rhead_nic.c @@ -176,6 +176,15 @@ rhead_board_cfg( encp->enc_required_pcie_bandwidth_mbps = bandwidth; encp->enc_max_pcie_link_gen = EFX_PCIE_LINK_SPEED_GEN3; + /* + * FIXME: MCDI table API support depends on an EF100 firmware build + * and an EF100 platform. It should be discovered by using a capability + * flag from MCDI that is not implemented yet. + * Right now we can safely rely on the return code from the libefx + * MCDI Table API. + */ + encp->enc_table_api_supported = B_TRUE; + return (0); fail3: diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c index 9f14faf271..1f1fb7d2af 100644 --- a/drivers/common/sfc_efx/base/siena_nic.c +++ b/drivers/common/sfc_efx/base/siena_nic.c @@ -205,6 +205,8 @@ siena_board_cfg( encp->enc_mae_supported = B_FALSE; encp->enc_mae_admin = B_FALSE; + encp->enc_table_api_supported = B_FALSE; + encp->enc_dma_mapping = EFX_NIC_DMA_MAPPING_FLAT; return (0);