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 1EEA4A0545; Wed, 25 Nov 2020 21:55:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F03AEC960; Wed, 25 Nov 2020 21:55:17 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by dpdk.org (Postfix) with ESMTP id 20FEBC95E for ; Wed, 25 Nov 2020 21:55:15 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id s21so3451211pfu.13 for ; Wed, 25 Nov 2020 12:55:15 -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:message-id:date :to; bh=DSsIYKLlaUsI+aDZ/lqaPljPq9UqQtTeCfYsv3V3M0c=; b=euEqhMx/4gksbrD3laR/X9nNVJfW8luTNfDJYRTpgGXhrNpmMXAHJf5ToARhk07o10 Hrp4txkNrkZKSuCYNKyRbn5Y2zaFw15Flb2xtxKO785eFv0p4u5lF7U4RdOHxRqioKVK RGDDsoDkSqetR62KLJG4LWSXn79Z0TfquhCkPyeArZDAWk+iVhMEIZAfTIsSOPjiAh2z WM0DM/5DNYXxhfeABAgKHtoZHf3Lh/RmTVTylwcMZUxAz0BqgDMpoMBionpj6ovJl2+C jdrvf+kU8JwxLKUh/kSmjmF9SL0d9Q98mUt10UtWmoT8P08i/UyNEFN1Hv8OdO5wo9Z8 2xlg== 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:message-id:date:to; bh=DSsIYKLlaUsI+aDZ/lqaPljPq9UqQtTeCfYsv3V3M0c=; b=hB8NC23GPtVWdYDSpHgpEFDHJtrdz5Kf0ViV5M1y+2IaPiWx+fCrzguGYK0t1K5z2x RGNiLEUYgxtoFsc4o9H+DXWJZtb9DBDClc8LQEjsUB3FjevpMkL0J7k9+Q7J+vBbHB5L bP+huInmesZPZ91yZ98XDRthvHJnHce82SUCa8I4T2Vi/slrWng1bDjDwtEaSuVP8Sod uSLu4DfSb9fGft936bWCmJo7IZex35sOSEX09QY4Ksxq8Yaj2TtZSi2NWdPkEt63nzsd IR2JXEiVi+Wl1LxEnjX5qDkxNrYwPffco9zh90+a7TYTnLTNvGJDRvSI8rSzuKED9wR0 fKEg== X-Gm-Message-State: AOAM5303U/GPBgvmRyZZEL2lqooPXVReW1vk6quu2/gx3EhNu/mix7KN IhQafPQ8I1Fb8SWEvPytCB++6toA740Ib7xC X-Google-Smtp-Source: ABdhPJypIN2uYNBfms2ZFR4BUTrjdl9+EEQrIIKT4D9lK89B1NTj6o49vz6Rk3kwCnwsd0L8hstxeg== X-Received: by 2002:a17:90a:4a0f:: with SMTP id e15mr6238870pjh.182.1606337714016; Wed, 25 Nov 2020 12:55:14 -0800 (PST) Received: from ?IPv6:2600:1700:6b0:fde0:9c35:b546:db20:3ab4? ([2600:1700:6b0:fde0:9c35:b546:db20:3ab4]) by smtp.gmail.com with ESMTPSA id b2sm2998pjq.20.2020.11.25.12.55.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 12:55:13 -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\)) Message-Id: Date: Wed, 25 Nov 2020 15:55:11 -0500 To: dev@dpdk.org X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: [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" Almost every PMD seems to do something like this (igb in this example): autoneg =3D (*speeds & ETH_LINK_SPEED_FIXED) =3D=3D 0; 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. Thus when I run a testpmd command like this: testpmd> port config all speed 100000 duplex full 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. 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? + 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 Does this sound reasonable or am I way off track? Thank you, Andrew 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; }