From e07f539ae0aa3ad623c4e8afcaca26906fd1eb17 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 30 Apr 2021 14:52:18 +0200 Subject: udp, passt: Introduce socket packet buffer, avoid getsockname() for UDP This is in preparation for scatter-gather IO on the UDP receive path: save a getsockname() syscall by setting a flag if we get the numbering of all bound sockets in a strict sequence (expected, in practice) and repurpose the tap buffer to be also a socket receive buffer, passing it down to protocol handlers. 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 0bb39a7..fe129ee 100644 --- a/util.h +++ b/util.h @@ -23,6 +23,7 @@ void debug(const char *format, ...); } while (0) #define MIN(x, y) (((x) < (y)) ? (x) : (y)) +#define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define IN_INTERVAL(a, b, x) ((x) >= (a) && (x) <= (b)) -- cgit v1.2.3