On 8/31/21 7:32 PM, Wang, Haiyue wrote:
>> -----Original Message-----
>> From: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru>
>> Sent: Wednesday, September 1, 2021 00:06
>> To: Ajit Khaparde <ajit.khapa...@broadcom.com>; Somnath Kotur 
>> <somnath.ko...@broadcom.com>; Daley,
>> John <johnd...@cisco.com>; Hyong Youb Kim <hyon...@cisco.com>; Xing, Beilei 
>> <beilei.x...@intel.com>;
>> Yang, Qiming <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; 
>> Wang, Haiyue
>> <haiyue.w...@intel.com>; Matan Azrad <ma...@nvidia.com>; Shahaf Shuler 
>> <shah...@nvidia.com>;
>> Viacheslav Ovsiienko <viachesl...@nvidia.com>; Thomas Monjalon 
>> <tho...@monjalon.net>; Yigit, Ferruh
>> <ferruh.yi...@intel.com>
>> Cc: dev@dpdk.org; Viacheslav Galaktionov 
>> <viacheslav.galaktio...@oktetlabs.ru>
>> Subject: [PATCH v4] ethdev: fix representor port ID search by name
>>
>> From: Viacheslav Galaktionov <viacheslav.galaktio...@oktetlabs.ru>
>>
>> Getting a list of representors from a representor does not make sense.
>> Instead, a parent device should be used.
>>
>> To this end, extend the rte_eth_dev_data structure to include the port ID
>> of the backing device for representors.
>>
>> Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktio...@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <andrew.rybche...@oktetlabs.ru>
>> ---
>> The new field is added into the hole in rte_eth_dev_data structure.
>> The patch does not change ABI, but extra care is required since ABI
>> check is disabled for the structure because of the libabigail bug [1].
>>
>> Potentially it is bad for out-of-tree drivers which implement
>> representors but do not fill in a new parert_port_id field in
>> rte_eth_dev_data structure. Do we care?
> 
> Set the `parent_port_id` to ' RTE_MAX_ETHPORTS' as an invalid port ID
> in rte_eth_dev_allocate ?

I like the idea. It should be safer this way. Many thanks.

Reply via email to