From: "lihuisong (C)" <lihuisong@huawei.com>
To: Chas Williams <3chas3@gmail.com>, <dev@dpdk.org>
Cc: <ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>,
<huangdaode@huawei.com>
Subject: Re: [PATCH V2] net/bonding: add link speeds configuration
Date: Thu, 22 Sep 2022 09:15:38 +0800 [thread overview]
Message-ID: <f4eac41f-2eb0-f7a5-0b4d-4fbd3e6b1e6e@huawei.com> (raw)
In-Reply-To: <191ad4e1-7548-46a4-4a31-b998f0353850@gmail.com>
在 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 <lihuisong@huawei.com>
>>>> ---
>>>> 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.
> .
next prev parent reply other threads:[~2022-09-22 1:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 3:19 [PATCH] " Huisong Li
2022-09-15 13:14 ` [PATCH V2] " Huisong Li
2022-09-15 13:43 ` Chas Williams
2022-09-16 2:09 ` lihuisong (C)
2022-09-16 15:07 ` Chas Williams
2022-09-22 1:15 ` lihuisong (C) [this message]
2022-09-22 1:33 ` [PATCH V3] " Huisong Li
2022-09-25 10:35 ` Chas Williams
2022-10-17 8:22 ` Andrew Rybchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4eac41f-2eb0-f7a5-0b4d-4fbd3e6b1e6e@huawei.com \
--to=lihuisong@huawei.com \
--cc=3chas3@gmail.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@xilinx.com \
--cc=huangdaode@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).