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 <nick.connolly@mayadata.io> Change-Id: Ica45d967878582d9a58e37b088eba4bf0d94104e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6464 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
c2a4702d7b
commit
d90a55117b
@ -979,9 +979,7 @@ spdk_pci_device_unclaim(struct spdk_pci_device *dev)
|
|||||||
dev->internal.claim_fd = -1;
|
dev->internal.claim_fd = -1;
|
||||||
unlink(dev_name);
|
unlink(dev_name);
|
||||||
}
|
}
|
||||||
#endif /* __linux__ */
|
#else /* !__linux__ */
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
int
|
int
|
||||||
spdk_pci_device_claim(struct spdk_pci_device *dev)
|
spdk_pci_device_claim(struct spdk_pci_device *dev)
|
||||||
{
|
{
|
||||||
@ -994,7 +992,7 @@ spdk_pci_device_unclaim(struct spdk_pci_device *dev)
|
|||||||
{
|
{
|
||||||
/* TODO */
|
/* TODO */
|
||||||
}
|
}
|
||||||
#endif /* __FreeBSD__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
int
|
int
|
||||||
spdk_pci_addr_parse(struct spdk_pci_addr *addr, const char *bdf)
|
spdk_pci_addr_parse(struct spdk_pci_addr *addr, const char *bdf)
|
||||||
|
Loading…
Reference in New Issue
Block a user