X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Faf_xdp%2Fcompat.h;h=3880dc7dd7f5b42b67ff6e0e6d31a4966f31a8bd;hb=3dee345ab31a8cc685c9fe5ba3f90aa322ee1d48;hp=7aa40d522ef6ddfcb4392418bbc7ec3200deccd5;hpb=74b46340e2d4f6b4b00476ed3790580004f21341;p=dpdk.git diff --git a/drivers/net/af_xdp/compat.h b/drivers/net/af_xdp/compat.h index 7aa40d522e..3880dc7dd7 100644 --- a/drivers/net/af_xdp/compat.h +++ b/drivers/net/af_xdp/compat.h @@ -4,6 +4,7 @@ #include #include +#include #if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE && \ defined(RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM) @@ -39,3 +40,17 @@ create_shared_socket(struct xsk_socket **xsk_ptr __rte_unused, return -1; } #endif + +#ifdef XDP_USE_NEED_WAKEUP +static int +tx_syscall_needed(struct xsk_ring_prod *q) +{ + return xsk_ring_prod__needs_wakeup(q); +} +#else +static int +tx_syscall_needed(struct xsk_ring_prod *q __rte_unused) +{ + return 1; +} +#endif