From 2dbed699e78ed3393ac97a64b04581974070afed Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 26 Sep 2021 23:19:40 +0200 Subject: passt: Align pkt_buf to PAGE_SIZE (start and size), try to fit in huge pages If transparent huge pages are available, madvise() will do the trick. While at it, decrease EPOLL_EVENTS for the main loop from 10 to 8, for slightly better socket fairness. Signed-off-by: Stefano Brivio --- util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'util.h') diff --git a/util.h b/util.h index 2e7699c..6402f41 100644 --- a/util.h +++ b/util.h @@ -25,6 +25,7 @@ void debug(const char *format, ...); #endif #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) +#define ROUND_DOWN(x, y) ((x) & ~((y) - 1)) #define SWAP(a, b) \ do { \ -- cgit v1.2.3