From patchwork Thu Jun 1 11:42:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Pryazhennikov X-Patchwork-Id: 127833 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 4519A42C02; Thu, 1 Jun 2023 13:42:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 649DA42D2C; Thu, 1 Jun 2023 13:42:27 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 2948E40DDC for ; Thu, 1 Jun 2023 13:42:24 +0200 (CEST) Received: from localhost.localdomain (unknown [37.252.90.53]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA512) (No client certificate requested) by agw.arknetworks.am (Postfix) with ESMTPSA id 944B4E126C; Thu, 1 Jun 2023 15:42:23 +0400 (+04) From: Denis Pryazhennikov To: dev@dpdk.org Cc: Viacheslav Galaktionov , Ferruh Yigit , Andrew Rybchenko , Roman Zhukov Subject: [PATCH 2/4] common/sfc_efx/base: detect and report FCS include support Date: Thu, 1 Jun 2023 15:42:18 +0400 Message-Id: <20230601114220.17796-3-denis.pryazhennikov@arknetworks.am> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230601114220.17796-1-denis.pryazhennikov@arknetworks.am> References: <20230601114220.17796-1-denis.pryazhennikov@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 A new variable was added to efx_nic_cfg_s to detect and report if FCS is supported by FW. Signed-off-by: Roman Zhukov Signed-off-by: Denis Pryazhennikov Reviewed-by: Viacheslav Galaktionov Acked-by: Andrew Rybchenko --- drivers/common/sfc_efx/base/ef10_nic.c | 6 ++++++ drivers/common/sfc_efx/base/efx.h | 1 + drivers/common/sfc_efx/base/siena_nic.c | 1 + 3 files changed, 8 insertions(+) diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c index db4834a65175..d5b19af8e811 100644 --- a/drivers/common/sfc_efx/base/ef10_nic.c +++ b/drivers/common/sfc_efx/base/ef10_nic.c @@ -1250,6 +1250,12 @@ ef10_get_datapath_caps( /* No limit on maximum number of Rx scatter elements per packet. */ encp->enc_rx_scatter_max = -1; + /* Check if the firmware supports include FCS on RX */ + if (CAP_FLAGS1(req, RX_INCLUDE_FCS)) + encp->enc_rx_include_fcs_supported = B_TRUE; + else + encp->enc_rx_include_fcs_supported = B_FALSE; + /* Check if the firmware supports packed stream mode */ if (CAP_FLAGS1(req, RX_PACKED_STREAM)) encp->enc_rx_packed_stream_supported = B_TRUE; diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 93bb4916bfd6..ff281167767d 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -1629,6 +1629,7 @@ typedef struct efx_nic_cfg_s { /* Datapath firmware vport reconfigure support */ boolean_t enc_vport_reconfigure_supported; boolean_t enc_rx_disable_scatter_supported; + boolean_t enc_rx_include_fcs_supported; /* Maximum number of Rx scatter segments supported by HW */ uint32_t enc_rx_scatter_max; boolean_t enc_allow_set_mac_with_installed_filters; diff --git a/drivers/common/sfc_efx/base/siena_nic.c b/drivers/common/sfc_efx/base/siena_nic.c index 9f14faf27168..c0316676eba2 100644 --- a/drivers/common/sfc_efx/base/siena_nic.c +++ b/drivers/common/sfc_efx/base/siena_nic.c @@ -187,6 +187,7 @@ siena_board_cfg( encp->enc_allow_set_mac_with_installed_filters = B_TRUE; encp->enc_rx_packed_stream_supported = B_FALSE; encp->enc_rx_var_packed_stream_supported = B_FALSE; + encp->enc_rx_include_fcs_supported = B_FALSE; encp->enc_rx_es_super_buffer_supported = B_FALSE; encp->enc_fw_subvariant_no_tx_csum_supported = B_FALSE;