numam-spdk/lib/env_dpdk
Jim Harris 6c75f0a266 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>
Change-Id: I3ee5d65ba90635b5a96b97dd0f4ab72a093fe8f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7506
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
2021-04-23 08:16:24 +00:00
..
env_internal.h Revert "env: Register external memory with DPDK" 2021-04-15 20:22:26 +00:00
env.c Revert "env: Register external memory with DPDK" 2021-04-15 20:22:26 +00:00
env.mk build: swap pci with bus_pci libs on the list 2021-02-25 10:26:48 +00:00
init.c env/dpdk: Use the DPDK device count for IOMMU mapping 2021-01-22 18:32:53 +00:00
Makefile lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
memory.c env_dpdk/memory: don't retrun error for VFIO_IOMMU_MAP_DMA ioctl 2021-04-19 19:20:51 +00:00
pci_event.c env: extend the use of event listen 2021-04-16 19:21:13 +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-04-23 08:16:24 +00:00
sigbus_handler.c lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
spdk_env_dpdk.map lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
threads.c Revert "thread: add spdk_env_get_primary_core" 2020-07-29 14:58:44 +00:00