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 406BF42A3F; Tue, 2 May 2023 16:57:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC39740ED8; Tue, 2 May 2023 16:57:27 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) by mails.dpdk.org (Postfix) with ESMTP id 2EB5040E2D for ; Tue, 2 May 2023 16:57:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ScXBxw1w4qy8ND2XPi0Hu16KnTbqVaZ9GQnwM5B3EHEE+Cf8x7usq7Cv95/EerMlUorSPKzqHgqnbwBuLTOhAK1aO9otQvf6ukxhEaMWoOQ07V528YPUALQt4V48MHpyQ1tY5c1BgAVNt5wYN92vTQiZVoVdeJfRonQTXZQaFr1AlRxLmlC+Gqby7kvlpUx5HB/IrFJW6nXWtNeZZLUiH8fBoYdK1u3Xzd3cDCG7+v/radwIWvzMMwLNNqJDotTob1WG94GrR9u8qWyBFdAUdxk+5Ya77iyVS9U6TxdFivepwGGtbcgPILZx4xZI9d8uWX3ch1iFh23EjBNj0qrQcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=By7r4DtXtf2cu2OCSvV79WF3h5z0Cl6k9mmQJfvzzYI=; b=HVM4gxknkWKVE2hy6PKc1VrKzvsPsun/Y8NRotQ7cO4vPuGVvRbA7GDWG4a80f8bEKSdHpt1iZip9NH+QpPTsVLDa2ogArA4YL2Iqcgf6Uk59anpGuVarUPvNZ5vI+SVu9+KzUjsXUdC8/8waJqMKRItnkwTCECf71zMjPYB01i2+2/Fe7U9ykeVB+xepOBq3JPOneL/4Qoo2hDBIfpO0JblWgE+qwhqz3QUxuoS1w9u6cM/sYFy7L0IkiIBKIvu1lrl/nNqyEzJtKUAqDGfMXhTrKF2NQBH33daSOzlO7+xW6No4Mk6ttqdesUa/+5+dDHfwS/StfHDn9y8naR1oQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=By7r4DtXtf2cu2OCSvV79WF3h5z0Cl6k9mmQJfvzzYI=; b=DOK1iAK4QFaXV32c8tRqkKRXr1M/RktgsU2TCeAEDAZ+khmqha9DXJK7mB7UB004q/GIC0J2NIbP/mj6JGnax8DPB1Aiq6p187ODJrBSD43z15Q8jPSZ9MtBNmN0ZAiPFTiAeJDPoRBvpOyfFc/WZpEb+z0DGEvLRCQ25gHzufM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by IA1PR12MB8493.namprd12.prod.outlook.com (2603:10b6:208:447::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.30; Tue, 2 May 2023 14:57:24 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::e818:77ea:75b5:f8cc]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::e818:77ea:75b5:f8cc%5]) with mapi id 15.20.6340.031; Tue, 2 May 2023 14:57:23 +0000 Message-ID: Date: Tue, 2 May 2023 15:57:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: Denis Pryazhennikov , dev@dpdk.org Cc: Ivan Malov , Viacheslav Galaktionov , Thomas Monjalon , Andrew Rybchenko References: <20230428102728.51956-1-denis.pryazhennikov@arknetworks.am> <20230428102728.51956-2-denis.pryazhennikov@arknetworks.am> From: Ferruh Yigit Subject: Re: [RFC PATCH 1/3] ethdev: update documentation for API to set FEC In-Reply-To: <20230428102728.51956-2-denis.pryazhennikov@arknetworks.am> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0232.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::21) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB8493:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f7f0d68-2b73-420e-1955-08db4b1d8980 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i3K3z9yGE9rYhn3WEcXTkYEMjN+AT8nlc0TjBaj66Rvxh+hSl6sxCwmJD3Xkm/cjFqlqvYBuZpZJDnRHp1goSFMBUXRMUJezSUzH6eaaJOKvWg+7sFM9VM4eHxhUaNSvDKcfg0m0RYWGZshzWtKqSsQ6hBF27iyVqeZgiW+TmwV2Z9hfSoCaA33uEsRnU82iZwe6pZRomenoDlF/haXl5rAqzVBlidrsB/VAyaHcPhEBEs16Eov12HFf44mQW2vuvFWcn7lWk03tOkxLuz0AnBXJV47x0FC7qKI0ktT7abPQ1SicK3VfndnbVcfGbkjNxLfPbt6/7weezha4Pswv3f7ceMJlvb01MDhl3ymjbAZ5nSnOrVnzYaVMKGx4WrQZvTisEsPl9w4KlY92Bgr9rybT+pZzIlMs+1lj01ZNwzumgEHxtK63OiHyKWw+8qURQE27NG+hQHShDGFEyweTY9znQKD2oUb6DtBRWY4CWNtSRsu9yg6a3c9pAhGhlchKf+TwP1g6EkpSEnT4OUHWFfK8cVHKImJ/Znjo8RJZW2Khzgeedwv1LrgFWh8iW2r97+wxmESiNyCOllB4pzJVV/j/5dzoU1waKpghXeGlQgbmYMEchDz/74QiyGl0SVNCy5xit3cJuuJFd5zr47hy6w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(376002)(366004)(346002)(136003)(39860400002)(451199021)(478600001)(31686004)(36756003)(5660300002)(38100700002)(2906002)(15650500001)(8936002)(8676002)(86362001)(316002)(31696002)(66556008)(66476007)(4326008)(66946007)(44832011)(41300700001)(83380400001)(54906003)(6506007)(6512007)(186003)(26005)(53546011)(2616005)(6486002)(6666004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTFmaG92UTFYUDVWYWxlREsxL3JNUFNUWVNOVGlYejBoc2FUUXVjVVRWZERB?= =?utf-8?B?dkdSdy9mQVVGamUydmtVamM2SktwWlB2dHMxTFlmd3hOZUVNWFBhSVVWeE1K?= =?utf-8?B?TTdQdml3Z1dReDVHb3Vsd3ZnUkZwQTRZTHRJekpQdkFLVkZtcGpROUIvRVV3?= =?utf-8?B?aVJMb2VpMDdtMHIrUEVUWHM4WTR1bllQVmdyL3JuVldUTzgvWEFPbFdSMzNw?= =?utf-8?B?eXF4N2hQWU1Kc1hPTGFaTVBWNlJvdStLRlNXK3QzV3g4LzArNjNmQWVGdm16?= =?utf-8?B?S1dtT1U3S2UwWGFDcENvUlVjdDhLTHk1UEM2NXVvN2hINlNrOUptUzBZMGZ6?= =?utf-8?B?YlIyUW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MS-Exchange-CrossTenant-Network-Message-Id: 2f7f0d68-2b73-420e-1955-08db4b1d8980 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2023 14:57:23.7918 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kVD024fpqUYj0coph3Xxt+862QX6uC6U/HBk2UVALgST9B3WEEOpHnMxyQ8N2PIi X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8493 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 On 4/28/2023 11:27 AM, Denis Pryazhennikov wrote: > The documentation for the rte_eth_fec_set() is updated > to provide more detailed information about how FEC modes are > handled. It also includes a description of the case when only > the AUTO bit is set. > > Signed-off-by: Denis Pryazhennikov > Acked-by: Ivan Malov > Acked-by: Viacheslav Galaktionov > --- > lib/ethdev/rte_ethdev.h | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h > index 99fe9e238b20..0f10ac944061 100644 > --- a/lib/ethdev/rte_ethdev.h > +++ b/lib/ethdev/rte_ethdev.h > @@ -4227,13 +4227,19 @@ int rte_eth_fec_get(uint16_t port_id, uint32_t *fec_capa); > * @param port_id > * The port identifier of the Ethernet device. > * @param fec_capa > - * A bitmask of allowed FEC modes. If AUTO bit is set, other > - * bits specify FEC modes which may be negotiated. If AUTO > - * bit is clear, specify FEC modes to be used (only one valid > - * mode per speed may be set). > + * A bitmask of allowed FEC modes. ack > + * If only the AUTO bit is set, the decision on which FEC > + * mode to use will be made by HW/FW or driver. ack > + * If the AUTO bit is set, other bits specify FEC modes > + * which may be negotiated. It means that only specified > + * FEC modes can be set. What about some simplification, maybe something like: " If the AUTO bit is set with some FEC modes, only specified FEC modes can be set. " > + * If AUTO bit is clear, specify FEC mode to be used > + * (only one valid mode per speed may be set). ack > + * NOFEC will be used if specified FEC modes are not > + * supported. If FEC modes are not supported, I think it is returning error, why change it? > * @return > * - (0) if successful. > - * - (-EINVAL) if the FEC mode is not valid. > + * - (-EINVAL) if *fec_capa* is not valid. I think original was correct, if FEC mode is not valid, dev_ops returns EINVAL, which cause API to return the same. > * - (-ENOTSUP) if underlying hardware OR driver doesn't support. > * - (-EIO) if device is removed. > * - (-ENODEV) if *port_id* invalid.