]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/af_xdp/compat.h
net/af_xdp: prefer busy polling
[dpdk.git] / drivers / net / af_xdp / compat.h
index 7aa40d522ef6ddfcb4392418bbc7ec3200deccd5..545c8aa395e076c76dad05a2b6276892f35f0477 100644 (file)
@@ -39,3 +39,17 @@ create_shared_socket(struct xsk_socket **xsk_ptr __rte_unused,
        return -1;
 }
 #endif
+
+#ifdef XDP_USE_NEED_WAKEUP
+static int
+syscall_needed(struct xsk_ring_prod *q, uint32_t busy_budget)
+{
+       return xsk_ring_prod__needs_wakeup(q) | busy_budget;
+}
+#else
+static int
+syscall_needed(struct xsk_ring_prod *q __rte_unused, uint32_t busy_budget)
+{
+       return busy_budget;
+}
+#endif