From 39ad062100b67a7a6ba77e4c8e2d539e3beb29b4 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 26 Jul 2021 14:20:36 +0200 Subject: tcp: Introduce scatter-gather IO path from socket to tap ...similarly to what was done for UDP. Quick performance test with 32KiB buffers, host to VM: $ iperf3 -c 192.0.2.2 -N [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 8.47 GBytes 7.27 Gbits/sec 0 sender [ 5] 0.00-10.00 sec 8.45 GBytes 7.26 Gbits/sec receiver $ iperf3 -c 2a01:598:88ba:a056:271f:473a:c0d9:abc1 [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-10.00 sec 8.43 GBytes 7.24 Gbits/sec 0 sender [ 5] 0.00-10.00 sec 8.41 GBytes 7.22 Gbits/sec receiver Signed-off-by: Stefano Brivio --- util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 90d7f7c..221df97 100644 --- a/util.h +++ b/util.h @@ -29,6 +29,8 @@ void debug(const char *format, ...); #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #endif +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + #define SWAP(a, b) \ do { \ typeof(a) __x = (a); (a) = (b); (b) = __x; \ -- cgit v1.2.3