1
0
Fork 0
mirror of https://passt.top/passt synced 2025-07-07 20:48:43 +02:00

tap, tcp, udp, icmp: Cut down on some oversized buffers

The existing sizes provide no measurable differences in throughput
and packet rates at this point. They were probably needed as batched
implementations were not complete, but they can be decreased quite a
bit now.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2022-03-28 16:56:01 +02:00
parent 1f4b7fa0d7
commit 37c228ada8
6 changed files with 72 additions and 31 deletions

View file

@ -63,7 +63,7 @@ union epoll_ref {
};
#define TAP_BUF_BYTES \
ROUND_DOWN(((ETH_MAX_MTU + sizeof(uint32_t)) * 256), PAGE_SIZE)
ROUND_DOWN(((ETH_MAX_MTU + sizeof(uint32_t)) * 128), 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))