aboutgitcodebugslistschat
path: root/passt.h
diff options
context:
space:
mode:
Diffstat (limited to 'passt.h')
-rw-r--r--passt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/passt.h b/passt.h
index 649d4fc..bb41e90 100644
--- a/passt.h
+++ b/passt.h
@@ -45,7 +45,8 @@ union epoll_ref {
uint64_t u64;
};
-#define TAP_BUF_BYTES ((ETH_MAX_MTU + sizeof(uint32_t)) * 256)
+#define TAP_BUF_BYTES \
+ ROUND_DOWN(((ETH_MAX_MTU + sizeof(uint32_t)) * 256), PAGE_SIZE)
#define TAP_BUF_FILL (TAP_BUF_BYTES - ETH_MAX_MTU - sizeof(uint32_t))
#define TAP_MSGS \
DIV_ROUND_UP(TAP_BUF_BYTES, ETH_ZLEN - 2 * ETH_ALEN + sizeof(uint32_t))