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 850E94296F; Mon, 17 Apr 2023 18:05:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0ADCE40DFB; Mon, 17 Apr 2023 18:05:48 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2066.outbound.protection.outlook.com [40.107.243.66]) by mails.dpdk.org (Postfix) with ESMTP id 1264340698 for ; Mon, 17 Apr 2023 18:05:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N21VkGBHe0e3yJQlRVThU6Yy/qOPx0qGH4pz4gNXZ+BvbSLnPwC4DuIseGqUYCeXYOKXYr14ljaY1hx6QLhnM1L+LSaGyF2pP90UGT+Tc4U4ywJgs9aHBIYBedhCA3h3PpUXUMNAVM2keRZIPEYe/gsf1+7DxY5Z/0tBJJ2Yy+lSvlvirMHkJ+p112Ctitf/LF9UwKLl1xi8nt3JDdcke07EJzl1yiGoT7qH6966EzFF41OFNB9ZOk6jC+jpziLx/mR+h2yNfpOCj3XTrthRTRKSCt9G51X1dxWWHjKeBD7YNSv1kdhOGIs2mqDvn1h/HQfxOiGo7CDmwi38Pqkvhg== 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=Cscti3uaUEy28OnolDYAdIoUUPfDKk3LbrXvQRNoZkQ=; b=O4+QvlgEV1yOR/r7OHDM6fzfg+ZFRi7JwFb4EtQ7SPX3ZRmhncvMO+rHLmge7UJGGrRpD28fcHxj+C5vMsGIy239XH6pK9jQ//3Wz6UhiT0i61UymPKVms3p5U5XfYawTxql4DJYM4s1Va7iihUJrUaZGQy/O9mIofNdLFIDReSxlVLQ/szi0TbublSADQJz8N6YmUeL2bdXoqKorHFSMc7bVhv0P+8+Bex9nwoKEfcf4hs+aBoxBNuoOvGc5CSnCUuCJ3Yo2SlK/R7LQl9hdNrzymh0405m6XonAHEj9ekCxVsBtrWvL7U05L8B1i6uZuQ48i9Bs2VovyuLRu5OeA== 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=Cscti3uaUEy28OnolDYAdIoUUPfDKk3LbrXvQRNoZkQ=; b=NRBSZ7wGQkdh4FxNreZ+A3vjmijpb0wLPTqVr2Y3AShF8YSkBfsKaNqe5l01/zHW0tSVnqvF0PdJB0zbPPVDnwnsr9ZTxKvU5lVcbhLOxQjbh+VLg/75sA4QvWOGYtFriiSxt7tMVhRAAplu43s7omuSIQ9P0v0DYGR4pOJZ6/Y= 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 DM4PR12MB7696.namprd12.prod.outlook.com (2603:10b6:8:100::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Mon, 17 Apr 2023 16:05:44 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::5e2c:c0ed:88a6:a4c7%7]) with mapi id 15.20.6298.045; Mon, 17 Apr 2023 16:05:44 +0000 Message-ID: Date: Mon, 17 Apr 2023 17:05:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Denis Pryazhennikov , "Min Hu (Connor)" , Andrew Rybchenko , Ajit Khaparde References: <2f32c6ab-1832-cbfc-5675-a63d554a0588@arknetworks.am> Cc: dev@dpdk.org From: Ferruh Yigit Subject: Re: Clarify FEC capabilities In-Reply-To: <2f32c6ab-1832-cbfc-5675-a63d554a0588@arknetworks.am> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LNXP265CA0055.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::19) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB7696:EE_ X-MS-Office365-Filtering-Correlation-Id: 2d1f075b-3920-4383-5027-08db3f5d9916 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UclHEKCdvqOmZLJfJYENJJFuDSoq6AxuxuQpnWOKmy3/OEOVxmIxFN7fc2YiC+FxGRRaqniR23FWxlLc8X6YEPoClkEf7XO7xI7qNh+OnuMtpMHm9dNhv6MO1nin83TkO8VuCzbCVVLHDGr3Qx2YXK9vA4eI9u7usPG+i4DQClCJ0vR7+bvAPrl1iftxtBPBBINJ3K6hqROGvKmUDAnflzOnLOwBO4qSvF1nnl+bT2SDHrFFgjW2gtKv4xIWdjEoQ1CrfdiBVMBbPYddrwLjf28nSbTJ4BgnjYSuiubTnsY0JMlD7eUxuUvoNB2gMwcrqHyTembyUcA/jXl2iy/fiob8WamMCoKGw+5Ev8XwZdg1rxQ9ncgaZBX/SqxvWAOTLpu/MFnOZ7tDFAvK0235loDGpg35Kw/uyHU8Pxy7d0gQOY4J5Z+HyYRzZKEA4hk4a4JT3gsRkaj1SeOBD7YRj2/ZXkTWMsL/B26om+4WK3DUwgxvepRi9fZPWLNG9poouBmQ1c/nK+fmt5FFWmCb0WjJRFh0UttDFmEoh4M2bUCf6HAzwPMM+bT8ukcBlFz02pBQTClUP9ToSTUWB2KvYMrU3or7wFx5f5scABtnBNs31COxoezkRHBOWH9eChTQR31oFRpeH5wA6QqgJIjjKogJuFtIaYlO7kuB24pLXeg= 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)(376002)(366004)(346002)(396003)(39860400002)(136003)(451199021)(478600001)(6666004)(38100700002)(8936002)(8676002)(316002)(41300700001)(4326008)(66476007)(66556008)(66946007)(110136005)(186003)(2906002)(53546011)(36756003)(6506007)(26005)(6512007)(86362001)(31696002)(83380400001)(31686004)(2616005)(5660300002)(3480700007)(7116003)(966005)(6486002)(44832011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UHNlMVZNUmlMM1N4ck56VTZ5QVE2SmJKOVJQbzBRNjhKNFBVbEFOVnBBaElQ?= =?utf-8?B?WFdlbkc4VWFIK205b1BBNTJTRE9PZFNtcUVvUGk5SHNEZlIxTDJtUTVNQkdi?= =?utf-8?B?VnNKVzlvVUxWOVRaVWhFOHphM0k2S2tQdXJ0RTA4U01hRGZHWmdvQmNlTXR4?= =?utf-8?B?SW9jL3hmM2lXOUhYaGZDemFCVzU5OTRQK2ZBN1NpL2dsTDBsdlhaRjZBM2RV?= =?utf-8?B?RXRMajBqSGgxMld1dlNUMVJKUktWbmNiMENrb1BnenBVN0lXUGFHcHA4ekFB?= =?utf-8?B?SDZGaU80c1BJR3IrWmppdWovS0dGUUZXeWZxYzg5NWtyTjFaOEk3TGhlYitE?= =?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mh?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d1f075b-3920-4383-5027-08db3f5d9916 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 16:05:43.9261 (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: zHnHoj3XWAWJTW0z7vTu6pcs3P/x5KnF1Vg9lfFA7Qyq1KXXPHK6Q1EZzLG/2Ii+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7696 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/7/2023 11:16 AM, Denis Pryazhennikov wrote: > Hi, > Hi Denis, cc'ed Connor as author of the feature and Andrew & Ajit as reviewers of it. > We are currently working on implementing the Forward Error Correction > (FEC) feature in our driver, but we have encountered some difficulties > in understanding the interpretation of the semantics of 'fec_capa', a > bitmask of allowed FEC modes. Specifically, we are unclear about the > meaning of various bit combinations. > > In rte_ethdev.h, 'fec_capa' is defined as follows: > > ``` >  * @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). > ``` > As far as I can see above comment is from `rte_eth_fec_get()` and `rte_eth_fec_set()` APIs, but I think comment doesn't make sense for `rte_eth_fec_get()`, if agreed it can be cleared. Following comments/requests during review may help to clarify more: https://inbox.dpdk.org/dev/c2654fcf-8ce9-e480-2f18-e6daea200350@solarflare.com/ https://inbox.dpdk.org/dev/65aadb61-4798-a428-1340-83bedb252ccd@solarflare.com/ Please find answers according my understanding: > We have a few questions regarding this definition: > * Is it possible for the AUTO bit to be set without any other bits? For `rte_eth_fec_set()`, not clear but I think it should be supported to set AUTO without other bits. The intention to set other bits is to have ability to exclude unset bits, if application is OK to set any supported mode, it is easier for app to just set AUTO bit. 'hns3' on the other hand seems doesn't support auto selecting from given mode list, and it enforces application to a single mode selection, not sure how compatible it is to the API spec as it is. > * Can both RS and BASER bits be set together without the AUTO bit? > Again for `rte_eth_fec_set()`, No, "only one valid mode per speed may be set". > Based on our understanding, we have come up with the following > interpretations for different bit combinations: > > * NOFEC overrides any other bits, and means "disable all FEC"; Ack > * AUTO on its own implies using cable requirements and link partner > autoneg with firmware-default preferences for the cable type; I didn't get this one, please describe more > * AUTO combined with either RS or BASER signifies using the specified > FEC type if the cable and link partner support it; otherwise, > autoneg/firmware-default is used; "AUTO combined with either RS or BASER", application leaves the decision to HW/FW/driver to pick RS or BASER. > * RS or BASER alone means using the specified FEC type if the cable and > link partner support it and either requests it; otherwise, no FEC is > employed; Ack > * Both RS and BASER, with or without AUTO, indicate using FEC if the > cable and link partner support it, preferring RS to BASER. > Can't have both RS and BASER without AUTO, and already described above how to behave with AUTO. > We would greatly appreciate any assistance in clarifying our > understanding and ensuring that our interpretations are accurate. > > Thank you in advance for your help. > Can you please make a patch to clarify API documentation as above, and we can continue discussion based on that patch, it is more practical that way. Thanks, Ferruh