From d90a55117bdb23555cc32410f420b158c924318e Mon Sep 17 00:00:00 2001 From: Nick Connolly Date: Thu, 18 Feb 2021 17:21:54 +0000 Subject: [PATCH] lib/env_dpdk: improve portability Provide a default stub definition for spdk_pci_device_claim/unclaim for non-linux platforms, rather than just for FreeBSD. Signed-off-by: Nick Connolly Change-Id: Ica45d967878582d9a58e37b088eba4bf0d94104e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6464 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk Reviewed-by: Shuhei Matsumoto Community-CI: Mellanox Build Bot --- lib/env_dpdk/pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index 47abede6d..22977b679 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -979,9 +979,7 @@ spdk_pci_device_unclaim(struct spdk_pci_device *dev) dev->internal.claim_fd = -1; unlink(dev_name); } -#endif /* __linux__ */ - -#ifdef __FreeBSD__ +#else /* !__linux__ */ int spdk_pci_device_claim(struct spdk_pci_device *dev) { @@ -994,7 +992,7 @@ spdk_pci_device_unclaim(struct spdk_pci_device *dev) { /* TODO */ } -#endif /* __FreeBSD__ */ +#endif /* __linux__ */ int spdk_pci_addr_parse(struct spdk_pci_addr *addr, const char *bdf)