From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C8921A04DB; Wed, 9 Dec 2020 20:32:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D21AC8F8; Wed, 9 Dec 2020 20:32:30 +0100 (CET) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by dpdk.org (Postfix) with ESMTP id D3293BE77 for ; Wed, 9 Dec 2020 20:32:28 +0100 (CET) Received: by mail-pf1-f173.google.com with SMTP id q22so1678897pfk.12 for ; Wed, 09 Dec 2020 11:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=/g0feGBapTcDpEPcoIO56zVC0eyiYcUKCQq5bz4OlcE=; b=h0Zz8Glyh+MecPiFFEhudB6OcXbPzOn2JbnfYGJRl18raO6W2gMo5lqkVLzj9ihTNQ V2G4bi8VSF4hT15MHV0mK9ZHo2Z+RIrJMNUys81De/35lR0blqHXoONdHEHu6IgKq0Yw OYRlQ1VD5WSkI9NxspnCp/5Nz++9i1wA4jpksjOIRNXvHJ+PV1cK47O143W7e/wRmf/O M2zaoLjMXQGeRcg85SLVg6b+E3Nn4vxRX3WzTonTOOWcLHleUb6zf8D7ow12AEULr9Xb yqhTu2bXsQ8SyGRQ+it8cI6haVY7HIyDbWLXNd3ns6jbgUoEF+6X/NRdrRBVfEMefSiG 3XdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=/g0feGBapTcDpEPcoIO56zVC0eyiYcUKCQq5bz4OlcE=; b=lc6v+HdbpLRtqCehJxcnMFuZ/PZfoZ12HeSFn+JYC84eG0ePtU9ncO84XuTM3WVE69 qKMCoOrWsHqaAVuK3X2Nmeaczg/yVj8EiOe6XJI48yr5YquWiWLJN5rMrvi4lKGor/AQ eEydzYLaHVO4LZH1LisG1H+R905abB4n8wgpTsTf16ij71BN5mXkxJouzrvoIHDyG+1i 5/jk5pqQ6kd0eF3Ukquu478jsieSnuxDYlxIXlLZjGd9VAp4hl4ZI3rPaR1qoxqaq/E8 kmEc6hdG0rD7pZGvrgcl5meYKqOHmb0raLlMSabZ3njhG2C3Yn5gz38uFDLFsktwksOP RVsQ== X-Gm-Message-State: AOAM533y6WCET6ftQcKZTwB3IOArPVJW9uwtHzZOHyiummoXvS5XwkqX FW67V39Rf3BL/C0jEOUdvCq7yK/LPbCHS6O2 X-Google-Smtp-Source: ABdhPJyOTI1nUQ0Ol2dMWoXIg78Y/dl3PW0Ylbj4ySwAEzzyMwNkGtDk34Wk7ulaP7urEQ1aQL2oVg== X-Received: by 2002:a63:5f41:: with SMTP id t62mr2253161pgb.403.1607542346855; Wed, 09 Dec 2020 11:32:26 -0800 (PST) Received: from ?IPv6:2600:1700:6b0:fde0:38f6:904:9f94:4f03? ([2600:1700:6b0:fde0:38f6:904:9f94:4f03]) by smtp.gmail.com with ESMTPSA id j69sm3599347pfd.37.2020.12.09.11.32.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 11:32:26 -0800 (PST) From: Andrew Boyer Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Wed, 9 Dec 2020 14:32:24 -0500 References: To: dev@dpdk.org, Ferruh Yigit In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [dpdk-dev] Q about testpmd and link speed settings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Any replies to this? Am I understanding the API correctly? -Andrew > On Nov 25, 2020, at 3:55 PM, Andrew Boyer wrote: >=20 > Almost every PMD seems to do something like this (igb in this = example): >=20 > autoneg =3D (*speeds & ETH_LINK_SPEED_FIXED) =3D=3D 0; >=20 > But testpmd=E2=80=99s parse_and_check_speed_duplex() doesn=E2=80=99t = ever set the FIXED bit. It either sets AUTONEG (0) or the bit for one of = the individual speeds. >=20 > Thus when I run a testpmd command like this: >=20 > testpmd> port config all speed 100000 duplex full >=20 > The PMD gets a speed setting in eth_dev->data->dev_conf->link_speeds, = but it doesn=E2=80=99t have the FIXED bit set. >=20 > The patch below corrects this behavior for me. For some reason it = breaks the testpmd link_bonding_autotest though - does anyone with an = understanding of the internals of the unit tests care to take a look at = why? >=20 > + TestCase [51] : test_tlb_verify_promiscuous_enable_disable = succeeded > + TestCase [52] : = test_tlb_verify_slave_link_status_change_failover failed > Port 8 must be stopped to allow configuration > + TestCase [53] : test_alb_change_mac_in_reply_sent failed > Port 8 must be stopped to allow configuration > + TestCase [54] : test_alb_reply_from_client failed > Port 8 must be stopped to allow configuration > + TestCase [55] : test_alb_receive_vlan_reply failed > Port 8 must be stopped to allow configuration > + TestCase [56] : test_alb_ipv4_tx failed=20 >=20 > Does this sound reasonable or am I way off track? >=20 > Thank you, > Andrew >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index a037a55c6a..075804b8b5 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -1627,6 +1627,9 @@ parse_and_check_speed_duplex(char *speedstr, = char *duplexstr, uint32_t *speed) > } > } >=20 > + if (*speed !=3D ETH_LINK_SPEED_AUTONEG) > + *speed |=3D ETH_LINK_SPEED_FIXED; > + > return 0; > } >=20 >=20 >=20