19/11/2024 16:57, Bruce Richardson:
> When using a secondary process, e.g. pdump, not all PCI devices will be
> probed correctly if the primary process has allowlisted devices using
> the shortened syntax, omitting the initial "0000:" domain. This is due
> to the strcmp failing to match a full address with a shortened one.
> 
> Fix this issue by comparing the device names/addresses normally and then
> having a special case second comparison for devices which start with
> "0000:".
> 
> Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process 
> model")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> ---
>  lib/ethdev/ethdev_driver.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
> index 9afef06431..e5590076c1 100644
> --- a/lib/ethdev/ethdev_driver.c
> +++ b/lib/ethdev/ethdev_driver.c
> +             /* for PCI devices, allow specifying name without a leading 
> "0000:" */
> +             if (strncmp(name, "0000:", 5) == 0 && /* is PCI address */
> +                             strcmp(eth_dev_shared_data->data[i].name, 
> &name[5]) == 0)
> +                     break;

I'm afraid it is not enough in all cases.
Shani is preparing a patch which uses the same PCI address formatting
in all cases.



Reply via email to