summaryrefslogtreecommitdiff
path: root/lib/util.h
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2019-07-18 13:11:14 -0700
committerIlya Maximets <i.maximets@samsung.com>2019-07-19 17:42:06 +0300
commit0de1b425962db073ebbaa3ddbde445580afda840 (patch)
tree583c01f90fcb0422e2ea500bbe20c945cb81f12e /lib/util.h
parent884ca8aceb0cbb5dc8ca3d124a59157ef2b941cf (diff)
downloadopenvswitch-0de1b425962db073ebbaa3ddbde445580afda840.tar.gz
netdev-afxdp: add new netdev type for AF_XDP.
The patch introduces experimental AF_XDP support for OVS netdev. AF_XDP, the Address Family of the eXpress Data Path, is a new Linux socket type built upon the eBPF and XDP technology. It is aims to have comparable performance to DPDK but cooperate better with existing kernel's networking stack. An AF_XDP socket receives and sends packets from an eBPF/XDP program attached to the netdev, by-passing a couple of Linux kernel's subsystems As a result, AF_XDP socket shows much better performance than AF_PACKET For more details about AF_XDP, please see linux kernel's Documentation/networking/af_xdp.rst. Note that by default, this feature is not compiled in. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'lib/util.h')
-rw-r--r--lib/util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.h b/lib/util.h
index 095ede20f..7ad8758fe 100644
--- a/lib/util.h
+++ b/lib/util.h
@@ -169,6 +169,11 @@ void ovs_strzcpy(char *dst, const char *src, size_t size);
int string_ends_with(const char *str, const char *suffix);
+void *xmalloc_pagealign(size_t) MALLOC_LIKE;
+void free_pagealign(void *);
+void *xmalloc_size_align(size_t, size_t) MALLOC_LIKE;
+void free_size_align(void *);
+
/* The C standards say that neither the 'dst' nor 'src' argument to
* memcpy() may be null, even if 'n' is zero. This wrapper tolerates
* the null case. */