[PATCH V5 2/5] ethdev: fix skip valid port in probing callback

lihuisong (C) lihuisong at huawei.com
Sat May 27 03:58:16 CEST 2023


在 2023/5/22 19:04, fengchengwen 写道:
> On 2023/1/31 11:33, Huisong Li wrote:
>> The event callback in application may use the macro RTE_ETH_FOREACH_DEV to
>> iterate over all enabled ports to do something(like, verifying the port id
>> validity) when receive a probing event. If the ethdev state of a port is
>> not RTE_ETH_DEV_UNUSED, this port will be considered as a valid port.
>>
>> However, this state is set to RTE_ETH_DEV_ATTACHED after pushing probing
>> event. It means that probing callback will skip this port. But this
>> assignment can not move to front of probing notification. See
>> commit be8cd210379a ("ethdev: fix port probing notification")
> ...
>
>>   
>>   struct rte_eth_dev_sriov {
>> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
>> index 17201fbe0f..094c2a952e 100644
>> --- a/lib/ethdev/version.map
>> +++ b/lib/ethdev/version.map
>> @@ -327,4 +327,5 @@ INTERNAL {
>>   	rte_eth_representor_id_get;
>>   	rte_eth_switch_domain_alloc;
>>   	rte_eth_switch_domain_free;
>> +	rte_eth_dev_is_used;
> requires alphabetical order.
Thanks, will fix it in v6.
>
>>   };
>>
> .


More information about the dev mailing list