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 D314AA0540; Thu, 22 Sep 2022 03:15:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7735F40691; Thu, 22 Sep 2022 03:15:49 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 7A2404067C for ; Thu, 22 Sep 2022 03:15:46 +0200 (CEST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MXy0g6T5SzlXLL; Thu, 22 Sep 2022 09:11:31 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 09:15:39 +0800 Received: from [10.67.103.231] (10.67.103.231) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 09:15:39 +0800 Message-ID: Date: Thu, 22 Sep 2022 09:15:38 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V2] net/bonding: add link speeds configuration To: Chas Williams <3chas3@gmail.com>, CC: , , 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> <191ad4e1-7548-46a4-4a31-b998f0353850@gmail.com> From: "lihuisong (C)" In-Reply-To: <191ad4e1-7548-46a4-4a31-b998f0353850@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600004.china.huawei.com (7.193.23.242) X-CFilter-Loop: Reflected 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 在 2022/9/16 23:07, Chas Williams 写道: > > > 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. Will fix in v3. Please review it. > .