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 5C886A0032; Fri, 16 Sep 2022 17:07:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F02E44021D; Fri, 16 Sep 2022 17:07:12 +0200 (CEST) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) by mails.dpdk.org (Postfix) with ESMTP id A405440156 for ; Fri, 16 Sep 2022 17:07:11 +0200 (CEST) Received: by mail-qv1-f49.google.com with SMTP id ml1so16849086qvb.1 for ; Fri, 16 Sep 2022 08:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=WOoE59ICoDCn/e06nbJEJKT+3OOmWAGBfOQ1iapkUJ0=; b=fWRxTgj6syLAFvafwdXiZGRhjorWmghU5iUWSArS6RYEAqfcd8hA7QRGmb8UZZBQOL k4gVk1vysoSivsPcsafY8EV25IyGgpft2EuWD6I91nsNd3DE3V9I2AlmVi6Ysin/8Dst +BTO3CwbWYtYTwpcmk6/0G3e9ksU7sIOkI1NSAvlmNRH7ZQgiKo8NhEZUt/l5jONZG0i jWpsqTeH+ULBB4BBuF/Frlg2UYQfZgvGSpcCW6y+VzGFPSYEuHsWEMGo6V3MfaHWXhtR 925uIy6IjL0zCx25Rto19SC3CLl98touvKTa0hiExGC7yqVqTiIac4537FkMl+Aj3oz/ 7d8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=WOoE59ICoDCn/e06nbJEJKT+3OOmWAGBfOQ1iapkUJ0=; b=eTdJHWzqxbZOfNaXy9tvVgKcTFbGCOCjZKovt+38q9hhRBJ0pYYX1H+aiP6SVdLHe6 Q1KzZdbcg0PqPM/WwREbp/a7ztV6+z6h8omrK0fPaHzo8lX3QJ7/6anS+ThXFdTEl62o QldTCKf8mDOKNWtYyrvdvTzRSB03ktdK2X6dV+fY5RxXA2bnQkYXXt6htwI0Bet2JHeo xPiYLXqI+kRYtcB6a9kFUyJbzpS1syBBRoP7Yr7aWPF08ung3rYm9dHN/1Gb/rqPSZTe 7sFUjLz3FZaNNoUDctLTi2RHEuZikc/r08w4ti7s2To+bQa1AgCko90GQSwDZVGwYT+U zhAQ== X-Gm-Message-State: ACrzQf3OLKybZhq/FCv6WNe8CpNejJeyGw/orQFH5eLg6HTdWzT1p99q X/+gQp5P7JSp48jaUM/iMcs= X-Google-Smtp-Source: AMsMyM5Jl9JB99jir+3AOlR0ZQVcX4aWK7JCu2nsAoyUx8tOYf+ZBkBPEHQS6UEBGhevMWiIo119Vg== X-Received: by 2002:a0c:f3c4:0:b0:4a3:a11:72cd with SMTP id f4-20020a0cf3c4000000b004a30a1172cdmr4680314qvm.109.1663340830421; Fri, 16 Sep 2022 08:07:10 -0700 (PDT) Received: from ?IPV6:2600:4040:225b:ea00:6063:8c9b:774a:6cf4? ([2600:4040:225b:ea00:6063:8c9b:774a:6cf4]) by smtp.googlemail.com with ESMTPSA id s9-20020ac87589000000b0035cb93ba803sm5231760qtq.45.2022.09.16.08.07.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Sep 2022 08:07:09 -0700 (PDT) Message-ID: <191ad4e1-7548-46a4-4a31-b998f0353850@gmail.com> Date: Fri, 16 Sep 2022 11:07:08 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH V2] net/bonding: add link speeds configuration Content-Language: en-US To: "lihuisong (C)" , dev@dpdk.org Cc: ferruh.yigit@xilinx.com, andrew.rybchenko@oktetlabs.ru, huangdaode@huawei.com References: <20220805031912.11729-1-lihuisong@huawei.com> <20220915131424.7337-1-lihuisong@huawei.com> <7aa62c59-fa86-1d20-31eb-e55e5fa60ec3@gmail.com> <2bd0d951-bed6-e092-54e9-9c3a34a05321@huawei.com> From: Chas Williams <3chas3@gmail.com> In-Reply-To: <2bd0d951-bed6-e092-54e9-9c3a34a05321@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 9/15/22 22:09, lihuisong (C) wrote: > > 在 2022/9/15 21:43, Chas Williams 写道: >> On 9/15/22 09:14, Huisong Li wrote: >>> This patch adds link speeds configuration. >>> >>> --- >>>   -v2: resend due to CI compiling failure. >>> >>> Signed-off-by: Huisong Li >>> --- >>>   drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++ >>>   1 file changed, 2 insertions(+) >>> >>> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c >>> b/drivers/net/bonding/rte_eth_bond_pmd.c >>> index 3191158ca7..0c1dbc3ff6 100644 >>> --- a/drivers/net/bonding/rte_eth_bond_pmd.c >>> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c >>> @@ -1717,6 +1717,8 @@ slave_configure(struct rte_eth_dev >>> *bonded_eth_dev, >>>         slave_eth_dev->data->dev_conf.rxmode.mtu = >>>               bonded_eth_dev->data->dev_conf.rxmode.mtu; >>> +    slave_eth_dev->data->dev_conf.link_speeds = >>> +            bonded_eth_dev->data->dev_conf.link_speeds; >>>         slave_eth_dev->data->dev_conf.txmode.offloads |= >>>           bonded_eth_dev->data->dev_conf.txmode.offloads; >> >> >> Where did bonded_eth_dev->data->dev_conf.link_speeds come from? This >> is rather messy since you might need to worry about intersection of >> speed_capa from the set of members in the bond group. > Hi chas, > > Thanks for your review. > > bonded_eth_dev->data->dev_conf.link_speeds come from user. I don't think > we need to complicate it. > Not all PMDs report 'speed_capa'. But the slave device knows if the > specified speed is supported. > So I think that it is better to leave to the slave device to determine > whether the speed is configured successfully. >> . I still think it would be a good idea to create an intersection of the supported speeds in bonding's dev_conf.speed_capa if we are going to start trying to set the speeds via the bonding interface. The PMDs that don't report a valid speed_capa are technically broken.