git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/af_xdp: make UMEM configure more readable
[dpdk.git]
/
drivers
/
net
/
af_xdp
/
compat.h
diff --git
a/drivers/net/af_xdp/compat.h
b/drivers/net/af_xdp/compat.h
index
545c8aa
..
bf40c65
100644
(file)
--- a/
drivers/net/af_xdp/compat.h
+++ b/
drivers/net/af_xdp/compat.h
@@
-2,11
+2,16
@@
* Copyright(c) 2020 Intel Corporation.
*/
* Copyright(c) 2020 Intel Corporation.
*/
+#ifdef RTE_NET_AF_XDP_LIBXDP
+#include <xdp/xsk.h>
+#else
#include <bpf/xsk.h>
#include <bpf/xsk.h>
+#endif
#include <linux/version.h>
#include <linux/version.h>
+#include <poll.h>
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE && \
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE && \
- defined(RTE_
LIBRTE_AF_XDP_PMD
_SHARED_UMEM)
+ defined(RTE_
NET_AF_XDP
_SHARED_UMEM)
#define ETH_AF_XDP_SHARED_UMEM 1
#endif
#define ETH_AF_XDP_SHARED_UMEM 1
#endif
@@
-42,14
+47,14
@@
create_shared_socket(struct xsk_socket **xsk_ptr __rte_unused,
#ifdef XDP_USE_NEED_WAKEUP
static int
#ifdef XDP_USE_NEED_WAKEUP
static int
-
syscall_needed(struct xsk_ring_prod *q, uint32_t busy_budget
)
+
tx_syscall_needed(struct xsk_ring_prod *q
)
{
{
- return xsk_ring_prod__needs_wakeup(q)
| busy_budget
;
+ return xsk_ring_prod__needs_wakeup(q);
}
#else
static int
}
#else
static int
-
syscall_needed(struct xsk_ring_prod *q __rte_unused, uint32_t busy_budget
)
+
tx_syscall_needed(struct xsk_ring_prod *q __rte_unused
)
{
{
- return
busy_budget
;
+ return
1
;
}
#endif
}
#endif