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 A2B2EA0032; Fri, 16 Sep 2022 04:09:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 478144021D; Fri, 16 Sep 2022 04:09:36 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 42A8A40156 for ; Fri, 16 Sep 2022 04:09:34 +0200 (CEST) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MTHT21M30zNm6K; Fri, 16 Sep 2022 10:04:54 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 16 Sep 2022 10:09:31 +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; Fri, 16 Sep 2022 10:09:30 +0800 Message-ID: <2bd0d951-bed6-e092-54e9-9c3a34a05321@huawei.com> Date: Fri, 16 Sep 2022 10:09:30 +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> From: "lihuisong (C)" In-Reply-To: <7aa62c59-fa86-1d20-31eb-e55e5fa60ec3@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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/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. > .