Commit 64d92671 authored by Artur Paszkiewicz's avatar Artur Paszkiewicz Committed by Tomasz Zawadzki
Browse files

env_dpdk: adjust PCI headers for DPDK 23.11



In DPDK 23.11 two deprecated macros were removed. This is not a breaking
change so add a patch adding those macros back and continue using
headers from DPDK 22.11.

Change-Id: Iac70ba87b4b68bc07548e52c4842e95fec2455c7
Signed-off-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19834


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@gmail.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent a0e16aec
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -42,6 +42,19 @@
 					enum rte_dev_event_type event,
 					void *cb_arg);
 
+/* Macros to check for invalid function pointers */
+#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) RTE_DEPRECATED(RTE_FUNC_PTR_OR_ERR_RET) \
+do { \
+	if ((func) == NULL) \
+		return retval; \
+} while (0)
+
+#define RTE_FUNC_PTR_OR_RET(func) RTE_DEPRECATED(RTE_FUNC_PTR_OR_RET) \
+do { \
+	if ((func) == NULL) \
+		return; \
+} while (0)
+
 /**
  * Device policies.
  */