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 45787A034F; Thu, 25 Feb 2021 19:33:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F0E8160727; Thu, 25 Feb 2021 19:33:16 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 2CC9C1607E5 for ; Thu, 25 Feb 2021 19:33:14 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id u11so3656815plg.13 for ; Thu, 25 Feb 2021 10:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LTyqsLS6pGJxz8iLGn0O3kQfNhy+A3Fmb++PahddCcI=; b=GcONK6F8G4S5TWowGci2pVeVVNMSKz4CROI+dgfw6QauWc+M5UBT12ZbVkbVe4y/zP taQTLsBqObcVQP5ufcDdwm0NSowdjsspV0qioJlVG3n6r95MGWFupACvv39l3Yjx/98l P3ngG6ppMvI+rZjHvU+jeduHsVFCmar6saLQf18n0a69zSXC0jnokIrfwYFkBsX2KwiU 6kZKafvOYvg41jdPTWRUWJYTUJudWnKGoVDAdnHBVpKGW2afnZUia5rnm3bSgFjKiI5R roq/ztP7KMrPSCQ2r3yySd44hetVRz6eqUGypC+r7laz/dGEnVTx1JJ4nO6bf96Cl70K xaEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=LTyqsLS6pGJxz8iLGn0O3kQfNhy+A3Fmb++PahddCcI=; b=s4UT4q46B/LaR7bKI6xIdVzpG8QnoyzPXpkjtl0wqpzwdopOr8o+G4rrroQ+b2FkkX 1gCIb2I3u7GcNJUEWvytsoOT8EKR4V0jULufYllVle0F2aWTTsS1rsa/wgKfxw3ol8L3 BGkS6SZfELRAW7HMkixjhBvWP9gWt+lLOIjxd6+tAcSZEnXCB8LhTM8zmiinGiktz+lK 9nbrLcK7HhdC7nv3Y8zQwVFQhgM0Or0v7o0XGuIe3A+LKRHxh1EcaZNebAirfF/f4eq8 kx6yAcaMDcKWJyiVZeJakSonf9iOc4aNKt7DEhbyntvsDdK9/Mh3LjoCC5r4jRdAdTWw ZyMQ== X-Gm-Message-State: AOAM5328Aaox+kS+yG+EhOsxfY14dG0CXDHMfHTvlAtc24Xi5vI8uXuj 3k1qgL+EFVSRuZ6JuHUBxqy7IQ== X-Google-Smtp-Source: ABdhPJyVrPxth5ymFzkYlAPURZQLhfnJ3lKkSlCewpdgL7yCESBTK8fj3qhb8R11/AXj8xOQzs2kgg== X-Received: by 2002:a17:90a:928d:: with SMTP id n13mr4566282pjo.12.1614277993118; Thu, 25 Feb 2021 10:33:13 -0800 (PST) Received: from ?IPv6:2600:1700:6b0:fde0:2c2c:2206:a00f:5a4c? ([2600:1700:6b0:fde0:2c2c:2206:a00f:5a4c]) by smtp.gmail.com with ESMTPSA id d16sm1010554pfq.203.2021.02.25.10.33.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 10:33:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) From: Andrew Boyer In-Reply-To: <20210222191824.40230-1-ajit.khaparde@broadcom.com> Date: Thu, 25 Feb 2021 13:33:10 -0500 Cc: dev@dpdk.org, ferruh.yigit@intel.com Content-Transfer-Encoding: quoted-printable Message-Id: <279CCAC7-AB50-4B2A-A724-C9DF1642A797@pensando.io> References: <20210222191824.40230-1-ajit.khaparde@broadcom.com> To: Ajit Khaparde X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add support for forced ethernet speed 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 Sender: "dev" > On Feb 22, 2021, at 2:18 PM, Ajit Khaparde = wrote: >=20 > Add support for forced ethernet speed setting. > Currently testpmd tries to configure the Ethernet port in autoneg = mode. > It is not possible to set the Ethernet port to a specific speed while > starting testpmd. In some cases capability to configure a forced speed > for the Ethernet port during initialization may be necessary. This = patch > tries to add this support. >=20 > The patch assumes full duplex setting and does not attempt to change = that. > So speeds like 10M, 100M are not configurable using this method. >=20 > The command line to configure a forced speed of 10G: > dpdk-testpmd -c 0xff -- -i --eth-link-speed 10000 >=20 > The command line to configure a forced speed of 50G: > dpdk-testpmd -c 0xff -- -i --eth-link-speed 50000 >=20 > Signed-off-by: Ajit Khaparde > --- ... > @@ -485,6 +486,41 @@ parse_event_printing_config(const char *optarg, = int enable) > return 0; > } >=20 > +static int > +parse_link_speed(int n) > +{ > + uint32_t speed; > + > + switch (n) { > + case 1000: > + speed =3D ETH_LINK_SPEED_1G; > + break; > + case 10000: > + speed =3D ETH_LINK_SPEED_10G; > + break; > + case 25000: > + speed =3D ETH_LINK_SPEED_25G; > + break; > + case 40000: > + speed =3D ETH_LINK_SPEED_40G; > + break; > + case 50000: > + speed =3D ETH_LINK_SPEED_50G; > + break; > + case 100000: > + speed =3D ETH_LINK_SPEED_100G; > + break; > + case 200000: > + speed =3D ETH_LINK_SPEED_200G; > + break; Shouldn=E2=80=99t all of these fixed values be OR=E2=80=99d with = ETH_LINK_SPEED_FIXED? The testpmd command to change speed is also missing it. -Andrew ...=