From: "lihuisong (C)" <lihuisong@huawei.com>
To: Long Wu <Long.Wu@nephogine.com>,
Chaoyong He <chaoyong.he@corigine.com>,
"dev@dpdk.org" <dev@dpdk.org>,
Ferruh Yigit <ferruh.yigit@amd.com>
Cc: oss-drivers <oss-drivers@corigine.com>,
James Hershaw <james.hershaw@corigine.com>
Subject: Re: [PATCH v3 1/8] ethdev: add member notification for bonding port
Date: Tue, 17 Oct 2023 16:27:22 +0800 [thread overview]
Message-ID: <287187f5-3e58-d64d-b521-8fa2f4f6f2f2@huawei.com> (raw)
In-Reply-To: <CY4PR1301MB19756C51216417A9487A8562EACEA@CY4PR1301MB1975.namprd13.prod.outlook.com>
在 2023/10/9 11:11, Long Wu 写道:
>> Hi Chaoyong,
>>
>> some comments as below.
>>
>>
>> 在 2023/10/8 9:50, Chaoyong He 写道:
>>> From: Long Wu <long.wu@corigine.com>
>>>
>>> Bonding PMD does not let member ports know the bonding port's
>>> information, like how many member ports the bonding port has, what
>>> mode the bonding port is in and so on.
>>>
>>> Add the notification interface for bonding port to let member port
>>> know it is added to a bonding port and what the bonding port's
>>> configuration is. If so the member ports have chance to achieve its
>>> bond-flow-offlod or other private bonding functions.
>> "its bond-flow-offlod or other private bonding functions"
>> I wonder that what PMDs can do with this.
>> Can you give an example in PMD to help others review?
> After this patch series, I will send out nfp PMD code about "its bond-flow-offlod or other private bonding functions ".
> I can explain here:
> "bond-flow" means the flow rule's destination port is a bonding port.
> Now DPDK can use bonding port as the source port in a flow rule and member ports can offload this flow.
> But member ports cannot offload a flow that its destination port is a bonding port.
> Because the member ports don't know the bonding port. (Of course, some PMDs has its self-function to let member ports know the bonding port but it doesn't a general "DPDK" way).
> After this "notify patch", DPDK can do "bond-flow-offload", also "other private bonding functions"(like hardware balance policy, primary port changing and so on) can work.
I think what you said is more like "bonding offload", right?
It seems that you cannot do it just based on current these API in this
series.
You probably have other works to upstream for like "bond-flow" and
"other private bonding functions".
>
>>> Signed-off-by: Long Wu <long.wu@corigine.com>
>>> Reviewed-by: James Hershaw <james.hershaw@corigine.com>
>>> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
>>> ---
>>> drivers/net/bonding/eth_bond_private.h | 1 +
>>> drivers/net/bonding/rte_eth_bond.h | 46 ++++++++++++++++
>>> drivers/net/bonding/rte_eth_bond_api.c | 73
>> ++++++++++++++++++++++++++
>>> drivers/net/bonding/rte_eth_bond_pmd.c | 27 ++++++++--
>>> drivers/net/bonding/version.map | 3 ++
>>> lib/ethdev/ethdev_driver.h | 18 +++++++
>>> 6 files changed, 165 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/bonding/eth_bond_private.h
>>> b/drivers/net/bonding/eth_bond_private.h
>>> index e688894210..f69e85c199 100644
>>> --- a/drivers/net/bonding/eth_bond_private.h
>>> +++ b/drivers/net/bonding/eth_bond_private.h
>>> @@ -180,6 +180,7 @@ struct bond_dev_private {
>>> uint8_t member_update_idx;
>>>
>>> bool kvargs_processing_is_done;
>>> + bool notify_member; /**< Enable member notification of bonding port.
>>> +*/
>>>
>>> uint32_t candidate_max_rx_pktlen;
>>> uint32_t max_rx_pktlen;
>>> diff --git a/drivers/net/bonding/rte_eth_bond.h
>>> b/drivers/net/bonding/rte_eth_bond.h
>>> index f10165f2c6..737beca446 100644
>>> --- a/drivers/net/bonding/rte_eth_bond.h
>>> +++ b/drivers/net/bonding/rte_eth_bond.h
>>> @@ -351,6 +351,52 @@ rte_eth_bond_link_up_prop_delay_set(uint16_t
>> bonding_port_id,
>>> int
>>> rte_eth_bond_link_up_prop_delay_get(uint16_t bonding_port_id);
>>>
>>> +/**
>>> + * Set the flag of whether bonding port notifies member ports.
>>> + *
>>> + * @param bonding_port_id
>>> + * Port ID of bonding device.
>>> + * @param notify_member
>>> + * Flag of whether bonding port notifies member ports.
>>> + *
>>> + * @return
>>> + * 0 on success, negative value otherwise.
>>> + */
>>> +__rte_experimental
>>> +int
>>> +rte_eth_bond_notify_member_flag_set(uint16_t bonding_port_id, bool
>>> +notify_member);
>> s/notify_membe/notify in input?
>> because function name reveals the meaning already.
> Thank you, you are right.
>
>>> +
>>> +/**
>>> + * Get the flag of whether bonding port notifies member ports.
>>> + *
>>> + * @param bonding_port_id
>>> + * Port ID of bonding device.
>>> + * @param notify_member
>>> + * Flag of whether bonding port notifies member ports.
>>> + *
>>> + * @return
>>> + * 0 on success, negative value otherwise.
>>> + */
>>> +__rte_experimental
>>> +int
>>> +rte_eth_bond_notify_member_flag_get(uint16_t bonding_port_id, bool
>>> +*notify_member);
>>> +
>>> +/**
>>> + * Notify the member ports of bonding port's information.
>>> + *
>>> + * This interface is called in the following functions:
>>> + * - bond_ethdev_lsc_event_callback()
>>> + * - bond_ethdev_configure()
>> Is this interface used just in these cases?
>> If so I don't think it should be a API in eth_dev_op.
> Sorry I'm a bit confused.
> Do you mean "rte_eth_bond_notify_members" this interface? This interface is called in 3 functions.
User can also call this API, right?
How should the user use it? Is it when update bonding port information?
I feel like to know what the time of the notice is.
>
>>> ...
>>> + struct rte_eth_dev *member_dev[RTE_MAX_ETHPORTS];
>>> +
>>> + if (valid_bonding_port_id(bonding_port_id) != 0)
>>> + return -EINVAL;
>>> +
>>> + bond_dev = &rte_eth_devices[bonding_port_id];
>>> + internals = bond_dev->data->dev_private;
>>> +
>>> + for (i = 0; i < internals->member_count; i++) {
>>> + member_port_id = internals->members[i].port_id;
>>> + member_dev[i] = &rte_eth_devices[member_port_id];
>>> + if (*member_dev[i]->dev_ops->bond_notify_member == NULL)
>>> + return -ENOTSUP;
>>> + }
>> Do we need all member ports support bond_notify_member api?
>> If allow user to select one member port to notify? This might be more general.
>> In addition, this action here is inconsistent with above handle(do not
>> notify member if doesn't supportbond_notify_member API).
> Yes, we do not need all member ports support this API.
> I just want to have a stricter restriction on this feature before, but I think your suggestion is better.
anyway, we need to have a clearly comments about this.
>
>>> ...
next prev parent reply other threads:[~2023-10-17 8:27 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 2:40 [PATCH 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-05 2:40 ` [PATCH 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-05 2:40 ` [PATCH 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-05 2:40 ` [PATCH 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-05 2:40 ` [PATCH 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-05 2:40 ` [PATCH 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-05 2:40 ` [PATCH 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-05 2:40 ` [PATCH 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-05 2:40 ` [PATCH 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-07 1:34 ` [PATCH v2 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-07 1:34 ` [PATCH v2 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-07 15:49 ` Stephen Hemminger
2023-10-08 1:37 ` Chaoyong He
2023-10-07 1:34 ` [PATCH v2 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-07 1:34 ` [PATCH v2 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-07 1:34 ` [PATCH v2 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-07 1:34 ` [PATCH v2 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-07 1:34 ` [PATCH v2 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-07 1:34 ` [PATCH v2 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-07 1:34 ` [PATCH v2 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-08 1:50 ` [PATCH v3 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-08 1:50 ` [PATCH v3 1/8] ethdev: add member notification for bonding port Chaoyong He
2023-10-08 2:49 ` lihuisong (C)
2023-10-09 3:11 ` 回复: " Long Wu
2023-10-17 8:27 ` lihuisong (C) [this message]
2023-10-18 2:16 ` Chaoyong He
2023-10-08 1:50 ` [PATCH v3 2/8] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-08 1:50 ` [PATCH v3 3/8] net/bonding: modify interface comment format Chaoyong He
2023-10-08 1:50 ` [PATCH v3 4/8] net/bonding: add bonding port arguments Chaoyong He
2023-10-08 1:50 ` [PATCH v3 5/8] net/bonding: support add port by data name Chaoyong He
2023-10-08 1:50 ` [PATCH v3 6/8] net/bonding: create new rte flow header file Chaoyong He
2023-10-08 1:50 ` [PATCH v3 7/8] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-17 8:33 ` lihuisong (C)
2023-10-17 9:25 ` Chaoyong He
2023-10-17 11:34 ` lihuisong (C)
2023-10-18 1:53 ` Chaoyong He
2023-10-17 15:56 ` Stephen Hemminger
2023-10-08 1:50 ` [PATCH v3 8/8] net/bonding: add commands for bonding port notification Chaoyong He
2023-10-13 2:22 ` [PATCH v3 0/8] Enhance the bond framework to support offload Chaoyong He
2023-10-13 12:53 ` Ferruh Yigit
2023-10-18 7:48 ` [PATCH v4 0/6] " Chaoyong He
2023-10-18 7:48 ` [PATCH v4 1/6] ethdev: add member notification for bonding port Chaoyong He
2023-10-18 7:48 ` [PATCH v4 2/6] ethdev: add API to get hardware creation of " Chaoyong He
2023-10-18 7:48 ` [PATCH v4 3/6] net/bonding: add bonding port arguments Chaoyong He
2023-10-18 7:48 ` [PATCH v4 4/6] net/bonding: support add port by data name Chaoyong He
2023-10-18 7:48 ` [PATCH v4 5/6] net/bonding: support checking valid bonding port ID Chaoyong He
2023-10-18 7:48 ` [PATCH v4 6/6] net/bonding: add commands for bonding port notification Chaoyong He
2023-11-15 16:01 ` [PATCH v4 0/6] Enhance the bond framework to support offload Ferruh Yigit
2023-11-16 1:45 ` Chaoyong He
2023-12-26 2:37 ` [PATCH v5 00/14] " Chaoyong He
2023-12-26 2:37 ` [PATCH v5 01/14] ethdev: add member notification for bonding port Chaoyong He
2023-12-26 2:37 ` [PATCH v5 02/14] ethdev: add API to get firmware creation of " Chaoyong He
2023-12-26 2:37 ` [PATCH v5 03/14] net/bonding: add bonding port arguments Chaoyong He
2023-12-26 2:37 ` [PATCH v5 04/14] net/bonding: support add port by data name Chaoyong He
2023-12-26 2:37 ` [PATCH v5 05/14] net/bonding: support checking valid bonding port ID Chaoyong He
2023-12-26 2:37 ` [PATCH v5 06/14] net/bonding: add commands for bonding port notification Chaoyong He
2023-12-26 2:37 ` [PATCH v5 07/14] net/bonding: create new rte flow header file Chaoyong He
2023-12-26 2:37 ` [PATCH v5 08/14] net/nfp: add bond firmware creation initialization Chaoyong He
2023-12-26 2:37 ` [PATCH v5 09/14] net/nfp: reset bond configuration of firmware Chaoyong He
2023-12-26 2:37 ` [PATCH v5 10/14] net/nfp: handle link event of bond firmware creation Chaoyong He
2023-12-26 2:37 ` [PATCH v5 11/14] net/nfp: support bond member notification Chaoyong He
2023-12-26 2:37 ` [PATCH v5 12/14] net/nfp: handle bond packets from firmware Chaoyong He
2023-12-26 2:37 ` [PATCH v5 13/14] net/nfp: support getting bond firmware creation Chaoyong He
2023-12-26 2:37 ` [PATCH v5 14/14] net/nfp: support offloading bond-flow Chaoyong He
2023-12-26 7:28 ` [PATCH v6 00/14] Enhance the bond framework to support offload Chaoyong He
2023-12-26 7:28 ` [PATCH v6 01/14] ethdev: add member notification for bonding port Chaoyong He
2023-12-26 7:28 ` [PATCH v6 02/14] ethdev: add API to get firmware creation of " Chaoyong He
2023-12-26 7:28 ` [PATCH v6 03/14] net/bonding: add bonding port arguments Chaoyong He
2023-12-26 7:28 ` [PATCH v6 04/14] net/bonding: support add port by data name Chaoyong He
2023-12-26 7:28 ` [PATCH v6 05/14] net/bonding: support checking valid bonding port ID Chaoyong He
2023-12-26 7:28 ` [PATCH v6 06/14] net/bonding: add commands for bonding port notification Chaoyong He
2023-12-26 7:28 ` [PATCH v6 07/14] net/bonding: create new rte flow header file Chaoyong He
2023-12-26 7:28 ` [PATCH v6 08/14] net/nfp: add bond firmware creation initialization Chaoyong He
2023-12-26 7:28 ` [PATCH v6 09/14] net/nfp: reset bond configuration of firmware Chaoyong He
2023-12-26 7:28 ` [PATCH v6 10/14] net/nfp: handle link event of bond firmware creation Chaoyong He
2023-12-26 7:28 ` [PATCH v6 11/14] net/nfp: support bond member notification Chaoyong He
2023-12-26 7:28 ` [PATCH v6 12/14] net/nfp: handle bond packets from firmware Chaoyong He
2023-12-26 7:28 ` [PATCH v6 13/14] net/nfp: support getting bond firmware creation Chaoyong He
2023-12-26 7:28 ` [PATCH v6 14/14] net/nfp: support offloading bond-flow Chaoyong He
2024-09-22 22:30 ` [PATCH v6 00/14] Enhance the bond framework to support offload Ferruh Yigit
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=287187f5-3e58-d64d-b521-8fa2f4f6f2f2@huawei.com \
--to=lihuisong@huawei.com \
--cc=Long.Wu@nephogine.com \
--cc=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=james.hershaw@corigine.com \
--cc=oss-drivers@corigine.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).