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 E380142C08; Fri, 2 Jun 2023 00:24:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 272B442D0D; Fri, 2 Jun 2023 00:24:00 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id 1A34B40693 for ; Fri, 2 Jun 2023 00:23:57 +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 8461FE1273; Fri, 2 Jun 2023 02:23:56 +0400 (+04) From: Denis Pryazhennikov To: dev@dpdk.org Cc: Ferruh Yigit , Andrew Rybchenko , Andy Moreton Subject: [PATCH 2/3] common/sfc_efx/base: add FEC related macros Date: Fri, 2 Jun 2023 02:23:48 +0400 Message-Id: <20230601222349.28965-3-denis.pryazhennikov@arknetworks.am> X-Mailer: git-send-email 2.37.0 (Apple Git-136) In-Reply-To: <20230601222349.28965-1-denis.pryazhennikov@arknetworks.am> References: <20230601222349.28965-1-denis.pryazhennikov@arknetworks.am> 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 Added new macros to simplify working with FEC bits Signed-off-by: Denis Pryazhennikov Reviewed-by: Andy Moreton --- drivers/common/sfc_efx/base/efx.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h index 49e29dcc1c69..10c412bcd7dc 100644 --- a/drivers/common/sfc_efx/base/efx.h +++ b/drivers/common/sfc_efx/base/efx.h @@ -3958,6 +3958,15 @@ typedef enum efx_phy_fec_type_e { EFX_PHY_FEC_RS } efx_phy_fec_type_t; +#define EFX_PHY_CAP_FEC_BIT(_fec_bit) (1U << EFX_PHY_CAP_##_fec_bit) +#define EFX_PHY_CAP_FEC_MASK \ + (EFX_PHY_CAP_FEC_BIT(BASER_FEC) | \ + EFX_PHY_CAP_FEC_BIT(25G_BASER_FEC) | \ + EFX_PHY_CAP_FEC_BIT(BASER_FEC_REQUESTED) | \ + EFX_PHY_CAP_FEC_BIT(25G_BASER_FEC_REQUESTED) | \ + EFX_PHY_CAP_FEC_BIT(RS_FEC) | \ + EFX_PHY_CAP_FEC_BIT(RS_FEC_REQUESTED)) + LIBEFX_API extern __checkReturn efx_rc_t efx_phy_fec_type_get( -- 2.37.0 (Apple Git-136)