[dpdk-dev] [PATCH v9 00/10] Windows bus/pci support

Tal Shnaiderman talshn at mellanox.com
Sun Jun 28 14:32:14 CEST 2020


> From: Narcisa Ana Maria Vasile <navasile at linux.microsoft.com>
> Subject: Re: [PATCH v9 00/10] Windows bus/pci support
> 
> On Wed, Jun 24, 2020 at 11:28:37AM +0300, talshn at mellanox.com wrote:
> > From: Tal Shnaiderman <talshn at mellanox.com>
> >
> > This patchset implements the EAL and PCI functions needed for probing
> PMDs using RTE_KDRV_NONE on Windows.
> >
> > ---
> > v9:
> > 	* Split the patch of common OS file to config and options patches
> (ThomasM).
> > 	* Remove rte_ prefixes from new functions as they are eal internal
> (ThomasM).
> > 	^ Move common declarations to eal_private.h.
> > 	* Add get_pci_hardware_id and parse_pci_hardware_id in pci.c
> (DmitryK)
> > 	* Fix issues in pci.c (DmitryK)
> > v8:
> > 	* Move internal_config to static inside eal_common_config.c and use
> getters for all external uses.
> > 	* Fix duplicated export line (FadyB)
> > 	* Fix FreeBSD missing function.
> > v7:
> > 	* Remove Unneeded code from MinGW mapping script (DmitryK)
> > 	* Fix error flow issues in pci.c (DmitryK)
> > 	* Fix Unix build errors following unity of common functions.
> > 	* Move strerror to rte_strerror (DmitryK)
> > v6:
> > 	* Fix duplication of exported functions for mingw by modifying the
> version.map in build (new commit)
> > 	* Fix comments and move additional functions to
> eal_common_config (DavidM)
> > 	* Fix cross-compilation in mingw (DmitryK)
> > 	* Fix Warnings
> > 	* Move off_t type to pci (ThomasM)
> > v5:
> > 	* Adjust mem-mapping functions to changes in latest memory
> management patchset.
> > 	* Fix incorrect implib definition in drivers/meson.build
> > v4:
> > 	* Fixed various warnings and naming conventions(DmitryK).
> > 	* Fixed broken mingw-64 build(DmitryK).
> > 	* Improved logging(DmitryK).
> > 	* Added patch to fix warnings on rte_pci_addr logging.
> > 	* Fixed broken make on linux/freebsd.
> > v3:
> > 	* Changes in BDF and hardware ids retrieval(DmitryK).
> > 	* Apply new generic MM to all pci unix callers(DmitryK).
> > 	* Minor corrections in pci.c(DmitryK).
> > v2:
> > 	* fix style issues.
> > 	* fix error handing flow in pci.c
> > 	* change eal_config.c to eal_common_config.c
> > ---
> Compiled successfully with clang 9.0.0.
> 2 warnings are generated, suggesting using safer versions of getenv() and
> strncpy().

strncpy() warning will go away in v10 after applying the comment from Thomas to modify it to strlcpy.

getenv() is a bit tricky:

a) The function it is being used in (rte_pci_get_sysfs_path) is a UNIX only function, from the usage of the function it seems getenv is safe to use.

b) Changing to code to  getenv_s, _dupenv_s or GetEnvironmentVariable would mean that the user will now need to handle a buffer to store the value of the environment variables.

Do we want to modify it for rte_pci_get_sysfs_path and all of the call sites? Looks like we can ignore this warning in this case.

> Do we have any test application to test with? dpdk-helloworld runs
> successfully.

You can use rte_bus_scan() inside rte_eal_init() to test the scanning process.



More information about the dev mailing list