xref: /spdk/scripts/env_dpdk/22.11/23.11-rte_dev.h.patch (revision 1e3d25b901a6b9d2dce4999e2ecbc02f98d79f05)
1@@ -42,6 +42,19 @@
2 					enum rte_dev_event_type event,
3 					void *cb_arg);
4
5+/* Macros to check for invalid function pointers */
6+#define RTE_FUNC_PTR_OR_ERR_RET(func, retval) RTE_DEPRECATED(RTE_FUNC_PTR_OR_ERR_RET) \
7+do { \
8+	if ((func) == NULL) \
9+		return retval; \
10+} while (0)
11+
12+#define RTE_FUNC_PTR_OR_RET(func) RTE_DEPRECATED(RTE_FUNC_PTR_OR_RET) \
13+do { \
14+	if ((func) == NULL) \
15+		return; \
16+} while (0)
17+
18 /**
19  * Device policies.
20  */
21