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 AF48543DAD; Tue, 2 Apr 2024 00:29:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9ECE7402E5; Tue, 2 Apr 2024 00:29:44 +0200 (CEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id 25A74402E5 for ; Tue, 2 Apr 2024 00:29:43 +0200 (CEST) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-513cf9bacf1so5672148e87.0 for ; Mon, 01 Apr 2024 15:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1712010582; x=1712615382; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xgkROCH5QtA0Ax8T1sQwkV+ybW3XmnzW/tgr5/uUTns=; b=PKJfjuRa1k7/AiCeiHhq2lOxIXdjQmtygubpuuGcPSOXfz0ClVPXdMnK5cKQdqdJ4y WnoZyRuaNOoS29wnIghGgJzwpQsC/Wmzzj8Ycjj/7ydsMJKsLCX+Z2iPkRTZDOE47J9f hdZQCP4Zb/4xSd2TWCgQX4li9vSN9uiSOBDWc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712010582; x=1712615382; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xgkROCH5QtA0Ax8T1sQwkV+ybW3XmnzW/tgr5/uUTns=; b=K8PUxmV1LdjtUn4O4YwNbU6xIffaFYfUpedTmskTpp6itFAKDnL1NdmaVLOG9VhP/t 2wAKiY4N9785JgnV+zC0VGEoCwDXwfTB+/2Y9aAXQNp1T1R1aaHpngv5gfWYHI7pYB8j thDlkqXcZswPmkJ2URGBw8YJ34komwOIf4b3KmyymS3eY6hVnflnDc5DTXAebEgfWujf YZ/T1txBYqDdfvvK0ocUtmc0+mRxAm0vaQedbfiTwKFb8A6UE0ke9riGEcdsyqN7cdlk GMLWe0LH0wY5j1Mczl9t3UPQrkk+BbVaGsie+Ip+UBNMymb2iLAZonp/QNg6MMBJFaY4 kCmg== X-Forwarded-Encrypted: i=1; AJvYcCXTsk6ExSG6+fjXPq0We/QDMgxE3K/G00is47r4RdrMnvqtqWCEFh3cmXUERuEpSDrBGrkN0waf7SUAEEU= X-Gm-Message-State: AOJu0Yw2PoiRvFkHOg7vzxX5/BATxnOx1tcwyMgpNDn5qXbaw6JUdYu+ Ub1u/wQhObU04Y4jPJBN9EVxjOIBjjhMkXvIeIS86Lau1wr/4sR7WHm0QmV5xZUJKjNCU2Yo4nP Z/B0BHk2vqbla2s+VeXsmsF8sD/FA9a7vnHvwZyYwj/S6hqVLJ7VDE9NtxCdRtOxcKIuiIoTReW S4xSsk X-Google-Smtp-Source: AGHT+IH9/olxkDdgNynt1dZUrtcKaHWzVGgcBRQCmOe2Or0G1PvxxzKDyvFeB46tHbQcRBsqjcWmpUDijCuPSEbVr/o= X-Received: by 2002:a05:6512:3d0a:b0:516:a978:7b06 with SMTP id d10-20020a0565123d0a00b00516a9787b06mr3912480lfv.5.1712010582528; Mon, 01 Apr 2024 15:29:42 -0700 (PDT) MIME-Version: 1.0 References: <20240312075238.3319480-4-huangdengdui@huawei.com> <5d2ab42c-4b56-4a40-8e0c-3ac9a5e34ec6@huawei.com> <4326199.QLehXeTyEo@thomas> In-Reply-To: <4326199.QLehXeTyEo@thomas> From: Damodharam Ammepalli Date: Mon, 1 Apr 2024 15:29:29 -0700 Message-ID: Subject: Re: [PATCH v2 1/6] ethdev: support setting lanes To: Thomas Monjalon Cc: huangdengdui , Ajit Khaparde , "lihuisong (C)" , roretzla@linux.microsoft.com, dev@dpdk.org, ferruh.yigit@amd.com, aman.deep.singh@intel.com, yuying.zhang@intel.com, andrew.rybchenko@oktetlabs.ru, stephen@networkplumber.org, jerinjacobk@gmail.com, liuyonglong@huawei.com, fengchengwen@huawei.com, haijie1@huawei.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000a51e9206151086b0" 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 --000000000000a51e9206151086b0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 1, 2024 at 1:07=E2=80=AFPM Thomas Monjalon wrote: > > 30/03/2024 12:38, huangdengdui: > > But, there are different solutions for the device to report the setting > > lane capability, as following: > > 1. Like the current patch, reporting device capabilities in speed and > > lane coupling mode. However, if we use this solution, we will have > > to couple the the lanes setting with speed setting. > > > > 2. Like the Damodharam's RFC patch [1], the device reports the maximum > > number of supported lanes. Users can config a lane randomly, > > which is completely separated from the speed. > > > > 3. Similar to the FEC capability reported by a device, the device repor= ts the > > relationship table of the number of lanes supported by the speed, > > for example: > > speed lanes_capa > > 50G 1,2 > > 100G 1,2,4 > > 200G 2,4 > > > > Options 1 and 2 have been discussed a lot above. > > > > For solution 1, the speed and lanes are over-coupled, and the implement= ation is too > > complex. But I think it's easier to understand and easier for the devic= e to report > > capabilities. In addition, the ethtool reporting capability also uses t= his mode. > > > > For solution 2, as huisong said that user don't know what lanes should = or can be set > > for a specified speed on one NIC. > > > > I think that when the device reports the capability, the lanes should b= e associated > > with the speed. In this way, users can know which lanes are supported b= y the current > > speed and verify the configuration validity. > > > > So I think solution 3 is better. What do you think? > > I don't understand your proposals. > Please could you show the function signature for each option? > > > testpmd can query the driver, and driver can export latest bit-map say in, rte_eth_speed_lanes_get()->supported_bmap 0 1Gb link speed 1 10Gb (NRZ: 10G per lane, 1 lane) link speed 2 25Gb (NRZ: 25G per lane, 1 lane) link speed 3 40Gb (NRZ: 10G per lane, 4 lanes) link speed 4 50Gb (NRZ: 25G per lane, 2 lanes) link speed 5 100Gb (NRZ: 25G per lane, 4 lanes) link speed 6 50Gb (PAM4-56: 50G per lane, 1 lane) link speed 7 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed 8 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed 9 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed 10 100Gb (PAM4-112: 100G per lane, 1 lane) link speed 11 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed 12 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed 13 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed 14 For future In cmd_config_speed_specific_parsed() if (parse_and_check_speed_duplex(res->value1, res->value2, &link_speed) = < 0) return; + /* validate speed x lanes combo */ + if (!cmd_validate_lanes(res->id, link_speed)) + return; Driver can validate the rest of other internal link parameters in rte_eth_dev_start() before applying the config to the hardware. --=20 This electronic communication and the information and any files transmitted= =20 with it, or attached to it, are confidential and are intended solely for=20 the use of the individual or entity to whom it is addressed and may contain= =20 information that is confidential, legally privileged, protected by privacy= =20 laws, or otherwise restricted from disclosure to anyone else. If you are=20 not the intended recipient or the person responsible for delivering the=20 e-mail to the intended recipient, you are hereby notified that any use,=20 copying, distributing, dissemination, forwarding, printing, or copying of= =20 this e-mail is strictly prohibited. If you received this e-mail in error,= =20 please return the e-mail to the sender, delete it from your computer, and= =20 destroy any printed copy of it. --000000000000a51e9206151086b0 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQhQYJKoZIhvcNAQcCoIIQdjCCEHICAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3cMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExd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