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 33FF143D26; Fri, 22 Mar 2024 23:31:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 250B5402A7; Fri, 22 Mar 2024 23:31:14 +0100 (CET) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 5AAE040284 for ; Fri, 22 Mar 2024 23:31:12 +0100 (CET) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2d6c220a377so2889341fa.2 for ; Fri, 22 Mar 2024 15:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1711146672; x=1711751472; 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=lDaeksiDmUlw3F1L/t2wCxxAGrYonRSjuU5WHfNWavk=; b=JANY6hrFuDwmMhTct/5KO6YkEfy9JlGyZI6raTT+pF2+bSKBEoiMGdpv4yJ/p0zQNf Paya4Ghp+eWzEevJBSDcyHk3vOaRJ+6ZgSBbUHFV2drwRCe6u1byU6JK61I4k7Zk+77F C48l3/n71BhQOlKohKU7Bn6Ww83N/Lxezcw34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711146672; x=1711751472; 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=lDaeksiDmUlw3F1L/t2wCxxAGrYonRSjuU5WHfNWavk=; b=wZTY0Tpj+0t8HJxUniPsUcPZJRzUn0QVAuaND97pF3hYII1GWTsobaiimtIQo56R+k dzFQPa08TojoYnKeMUnWMxk17YO1m0iawGb+924BYYFldJx/n5tkHmngiBo1ZOLdcnOk lKgk3UfrOQIBSGWXCxIIv7hXBdgoXyNmA+0GnPuEPyYGUWbwQToPNwLiU0th2tCWyEbm nwGKMGCr3gGb4xoKVyZceXbOn31zAbHtHnEqKxfr73gRI2FvUAXYqbVw7dB6U+tZXkgz u9lR0tyMeBPO5OS92aA7k0dZWv85UyGz5OKx2uyk3t01PCgTNrXjHCB7aeYcPAVIookX I5OA== X-Forwarded-Encrypted: i=1; AJvYcCUWas0WqVSalHr7IyF3Fr3Qrjpx35f56cBKPTJpj1vA72aWH4Tcd+Fj9on1oswNpzSGm6XXtPvfqPDcG9c= X-Gm-Message-State: AOJu0YwcLFW4JBFeuILWo6piW9GMbFvO7QM+WaYGnfxBVvGtSjHMintX 1gKs/J4Uf+3xS/85AXTdK9o5lUWGJ0HNJCaSpbKLOdrvDZWK76DfwLy13kxMOsWb2b3QWwNXCKN lF9i8BWdQnM7sVVNvuE1id2J7waUrK1/Ke/TZqrOHopVyNscw9atvY5CPmlakwRida9Pb+tAzTi gbqUyw X-Google-Smtp-Source: AGHT+IEC4xo+jfhkIRICgchAapBAflRavLhTb8vMntabvRD/eSCsKYOQZoGdfQBEB1bt9Nw1j9NydcmvHx5VVEcf10g= X-Received: by 2002:a05:651c:1047:b0:2d2:ef14:593e with SMTP id x7-20020a05651c104700b002d2ef14593emr567777ljm.48.1711146671778; Fri, 22 Mar 2024 15:31:11 -0700 (PDT) MIME-Version: 1.0 References: <20240312075238.3319480-4-huangdengdui@huawei.com> <20240322070923.244417-1-huangdengdui@huawei.com> <20240322070923.244417-2-huangdengdui@huawei.com> <4413054.MSiuQNM8U4@thomas> <20240322173202.GA11150@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20240322173202.GA11150@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: Damodharam Ammepalli Date: Fri, 22 Mar 2024 15:30:57 -0700 Message-ID: Subject: Re: [PATCH v2 1/6] ethdev: support setting lanes To: Tyler Retzlaff Cc: Ajit Khaparde , Thomas Monjalon , Dengdui Huang , 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, lihuisong@huawei.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000008d2e030614476114" 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 --0000000000008d2e030614476114 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 22, 2024 at 10:32=E2=80=AFAM Tyler Retzlaff wrote: > > On Fri, Mar 22, 2024 at 08:15:00AM -0700, Ajit Khaparde wrote: > > On Fri, Mar 22, 2024 at 6:58=E2=80=AFAM Thomas Monjalon wrote: > > > > > > 22/03/2024 08:09, Dengdui Huang: > > > > -#define RTE_ETH_LINK_SPEED_10G RTE_BIT32(8) /**< 10 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_20G RTE_BIT32(9) /**< 20 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_25G RTE_BIT32(10) /**< 25 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_40G RTE_BIT32(11) /**< 40 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_50G RTE_BIT32(12) /**< 50 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_56G RTE_BIT32(13) /**< 56 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_100G RTE_BIT32(14) /**< 100 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 Gbps */ > > > > -#define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16) /**< 400 Gbps */ > > > > +#define RTE_ETH_LINK_SPEED_10G RTE_BIT32(8) /**< 10 Gb= ps */ > > > > +#define RTE_ETH_LINK_SPEED_20G RTE_BIT32(9) /**< 20 Gb= ps 2lanes */ > > > > +#define RTE_ETH_LINK_SPEED_25G RTE_BIT32(10) /**< 25 Gb= ps */ > > > > +#define RTE_ETH_LINK_SPEED_40G RTE_BIT32(11) /**< 40 Gb= ps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_50G RTE_BIT32(12) /**< 50 Gb= ps */ > > > > +#define RTE_ETH_LINK_SPEED_56G RTE_BIT32(13) /**< 56 Gb= ps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_100G RTE_BIT32(14) /**< 100 G= bps */ > > > > +#define RTE_ETH_LINK_SPEED_200G RTE_BIT32(15) /**< 200 G= bps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_400G RTE_BIT32(16) /**< 400 G= bps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_10G_4LANES RTE_BIT32(17) /**< 10 G= bps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_50G_2LANES RTE_BIT32(18) /**< 50 Gb= ps 2 lanes */ > > > > +#define RTE_ETH_LINK_SPEED_100G_2LANES RTE_BIT32(19) /**< 100 G= bps 2 lanes */ > > > > +#define RTE_ETH_LINK_SPEED_100G_4LANES RTE_BIT32(20) /**< 100 G= bps 4lanes */ > > > > +#define RTE_ETH_LINK_SPEED_200G_2LANES RTE_BIT32(21) /**< 200 G= bps 2lanes */ > > > > +#define RTE_ETH_LINK_SPEED_400G_8LANES RTE_BIT32(22) /**< 400 G= bps 8lanes */ > > > > > > I don't think it is a good idea to make this more complex. > > > It brings nothing as far as I can see, compared to having speed and l= anes separated. > > > Can we have lanes information a separate value? no need for bitmask. > > I agree. > > +1 api design coupling the two together is definitely undesirable it > seems like half the time you end up with redundant RTE_ETH_LANES_UNKNOWN. https://patchwork.dpdk.org/project/dpdk/list/?series=3D31606 This is how we have implemented internally and we could use this as a refer= ence. Ethtool 6.x allows lanes configuration this way. ethtool -s ens6f0np0 speed duplex full autoneg off lanes < int > > > > > > > > > > > > --=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. --0000000000008d2e030614476114 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 VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFj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