[PATCH v3 7/8] net/bonding: support checking valid bonding port ID
lihuisong (C)
lihuisong at huawei.com
Tue Oct 17 13:34:32 CEST 2023
在 2023/10/17 17:25, Chaoyong He 写道:
>> Hi Chaoyong,
>>
>> It is better to separate patch 3/8 and patch 6/8 from this series.
> The patch 3/8 is okay to separate, there is no problem.
> But if patch 6/8 be a separate patch, this patch series will need depend on it.
> I'm not sure if that is okay?
I doesn't see the dependency of patch 7/8 and 8/8 on it.
If you remove the patches which isn't releated with the subject of this
series, it is helpful for reviewing.
>
>> 在 2023/10/8 9:50, Chaoyong He 写道:
>>> From: Long Wu <long.wu at corigine.com>
>>>
>>> Add API to support checking if the port id is a bonding port id.
>>>
>>> Signed-off-by: Long Wu <long.wu at corigine.com>
>>> Reviewed-by: James Hershaw <james.hershaw at corigine.com>
>>> Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
>>> ---
>>> drivers/net/bonding/rte_eth_bond.h | 13 +++++++++++++
>>> drivers/net/bonding/rte_eth_bond_api.c | 7 +++++++
>>> drivers/net/bonding/version.map | 1 +
>>> 3 files changed, 21 insertions(+)
>>>
>>> diff --git a/drivers/net/bonding/rte_eth_bond.h
>>> b/drivers/net/bonding/rte_eth_bond.h
>>> index 3f427b6bab..e8152a155f 100644
>>> --- a/drivers/net/bonding/rte_eth_bond.h
>>> +++ b/drivers/net/bonding/rte_eth_bond.h
>>> @@ -461,6 +461,19 @@ __rte_experimental
>>> int
>>> rte_eth_bond_hw_create_get(uint16_t bonding_port_id, uint16_t
>>> member_port_id);
>>>
>>> +/**
>>> + * Check whether bonding port id is valid.
>>> + *
>>> + * @param bonding_port_id
>>> + * Port ID of bonding device.
>>> + *
>>> + * @return
>>> + * 0 on success, negative value otherwise.
>>> + */
>>> +__rte_experimental
>>> +int
>>> +rte_eth_bond_valid_bonding_port_id(uint16_t bonding_port_id);
>>> +
>>> #ifdef __cplusplus
>>> }
>>> #endif
>>> diff --git a/drivers/net/bonding/rte_eth_bond_api.c
>>> b/drivers/net/bonding/rte_eth_bond_api.c
>>> index 0113dfdc16..80d71529cc 100644
>>> --- a/drivers/net/bonding/rte_eth_bond_api.c
>>> +++ b/drivers/net/bonding/rte_eth_bond_api.c
>>> @@ -1214,3 +1214,10 @@ rte_eth_bond_hw_create_get(uint16_t
>>> bonding_port_id, uint16_t member_port_id)
>>>
>>> return member_dev->dev_ops->bond_hw_create_get(member_dev,
>> bonding_dev);
>>> }
>>> +
>>> +
>>> +int
>>> +rte_eth_bond_valid_bonding_port_id(uint16_t port_id) {
>>> + return valid_bonding_port_id(port_id); }
>>> diff --git a/drivers/net/bonding/version.map
>>> b/drivers/net/bonding/version.map index 3cfff51269..bf5e50521e 100644
>>> --- a/drivers/net/bonding/version.map
>>> +++ b/drivers/net/bonding/version.map
>>> @@ -39,4 +39,5 @@ EXPERIMENTAL {
>>> rte_eth_bond_notify_member_flag_get;
>>> rte_eth_bond_notify_member_flag_set;
>>> rte_eth_bond_notify_members;
>>> + rte_eth_bond_valid_bonding_port_id;
>>> };
More information about the dev
mailing list