numam-spdk/lib/env_dpdk
Jim Harris 4d419d55b8 env_dpdk: save hotplug timeout timestamps separate from rte_devargs
DPDK recently clarified some semantics on the rte_devargs 'data'
and 'args' fields.  This actually breaks our use of the 'data'
field to store the 2 second timeout timestamp for delaying
attach to newly inserted devices.  Investigating this further,
it does not seem our use of the 'data' field was valid - it just
happened to work until now.

We could use the 'args' field now.  But knowing whether to use
'args' or 'data' would then be dependent on the DPDK version.
We cannot use RTE_VERSION_NUM to decide, because this is a
compile time decision, and it is possible in shared library
use cases that we could actually link and execute against a
different version of DPDK than we built against.

So instead we will create our own env_devargs structure that
will store these allowed_at timestamps. Currently it's just
a linked list (which is exactly how DPDK does it) - we could
make it more optimal with a hash table down the road, but this
code only executes when we are doing PCI enumeration so it is
not performance critical.

Fixes #1904.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7506 (master)

(cherry picked from commit 6c75f0a266)
Change-Id: I3ee5d65ba90635b5a96b97dd0f4ab72a093fe8f7
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7635
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-05-10 10:45:57 +00:00
..
env_internal.h env/dpdk: Use the DPDK device count for IOMMU mapping 2021-01-22 18:32:53 +00:00
env.c lib: Use PRId64 for portability 2020-11-20 11:01:37 +00:00
env.mk lib/env_dpdk: add rte_net dependency 2021-02-17 09:34:19 +00:00
init.c env/dpdk: Use the DPDK device count for IOMMU mapping 2021-01-22 18:32:53 +00:00
Makefile build: generate pkg-config files for SPDK 2021-01-21 09:46:32 +00:00
memory.c lib:env_dpdk fix the enum rte_kernel_driver definition deference between dpdk 19.11 and 20.11 2021-02-16 08:13:11 +00:00
pci_idxd.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_ioat.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_virtio.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_vmd.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci.c env_dpdk: save hotplug timeout timestamps separate from rte_devargs 2021-05-10 10:45:57 +00:00
spdk_env_dpdk.map env/memory: return the memory virtual address's file descriptor and offset 2020-10-21 20:47:01 +00:00
threads.c Revert "thread: add spdk_env_get_primary_core" 2020-07-29 14:58:44 +00:00