Commit 161e2aed authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Jim Harris
Browse files

pci: use the new hotplug API for DPDK 18.11+



The previous functions were deprecated and now removed.

Change-Id: I076125aaf80b97c627ca45b860700fdf6d87e925
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/430557


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 4621ba73
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -84,7 +84,9 @@ spdk_pci_device_detach(struct spdk_pci_device *device)
#endif
#endif

#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
#if RTE_VERSION >= RTE_VERSION_NUM(18, 11, 0, 0)
	rte_eal_hotplug_remove("pci", device->device.name);
#elif RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
	struct spdk_pci_addr	addr;
	char			bdf[32];

@@ -136,7 +138,9 @@ spdk_pci_device_attach(struct spdk_pci_enum_ctx *ctx,
	ctx->cb_fn = enum_cb;
	ctx->cb_arg = enum_ctx;

#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
#if RTE_VERSION >= RTE_VERSION_NUM(18, 11, 0, 0)
	if (rte_eal_hotplug_add("pci", bdf, "") != 0) {
#elif RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
	if (rte_eal_dev_attach(bdf, "") != 0) {
#elif RTE_VERSION >= RTE_VERSION_NUM(17, 05, 0, 4)
	if (rte_pci_probe_one(&addr) != 0) {