From patchwork Fri Apr 28 10:27:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Pryazhennikov X-Patchwork-Id: 126622 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 C36E242A13; Fri, 28 Apr 2023 12:27:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 379624113C; Fri, 28 Apr 2023 12:27:32 +0200 (CEST) Received: from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80]) by mails.dpdk.org (Postfix) with ESMTP id C2EA44021D for ; Fri, 28 Apr 2023 12:27:30 +0200 (CEST) Received: from localhost.localdomain (unknown [37.252.90.108]) (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 67FBCE0EC6 for ; Fri, 28 Apr 2023 14:27:30 +0400 (+04) From: Denis Pryazhennikov To: dev@dpdk.org Subject: [RFC PATCH 0/3] improve FEC API usage Date: Fri, 28 Apr 2023 14:27:25 +0400 Message-Id: <20230428102728.51956-1-denis.pryazhennikov@arknetworks.am> X-Mailer: git-send-email 2.37.0 (Apple Git-136) 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 The documentation for the FEC API is currently incomplete and contains inaccuracies in its descriptions of function parameters. Specifically, the semantics of the fec_capa parameter in rte_eth_fec_set() is not well-defined. It does not provide information on what should be done if only AUTO bit is set or one of the specified FEC modes is not supported. Additionally, the fec_capa parameter in rte_eth_fec_get() implies that more than one FEC mode can be obtained, but it is wrong. Furthermore, the behaviour is undefined in rte_eth_fec_set() when the fec_capa parameter is zero. To address these issues, a patch series has been created that updates the FEC API documentation, renames one of the parameters to improve its clarity and adds a check for zero fec_capability. Denis Pryazhennikov (3): ethdev: update documentation for API to set FEC ethdev: check that at least one FEC mode is specified ethdev: rename parameter in API to get FEC lib/ethdev/rte_ethdev.c | 13 +++++++++---- lib/ethdev/rte_ethdev.h | 25 ++++++++++++++----------- 2 files changed, 23 insertions(+), 15 deletions(-)