From 1a9fad4022519890f37b734656fe0efd34bfbb08 Mon Sep 17 00:00:00 2001 From: Piotr Tworek Date: Tue, 14 Dec 2021 00:26:27 +0100 Subject: [PATCH] virtio_nic: Tweak default buffer sizes. After VirtIO::Queue refactoring buffers no longer share the same dataspace as VirtIO rings. This makes optimal buffer calculations a lot easier. In this case 64 buffers 2kB each will need precisely 128kB of RAM. Previous value of 2016 will just waste 768b. Fixed #4347 --- repos/os/src/drivers/nic/virtio/component.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/drivers/nic/virtio/component.h b/repos/os/src/drivers/nic/virtio/component.h index f9f4151193..7810a5c5c5 100644 --- a/repos/os/src/drivers/nic/virtio/component.h +++ b/repos/os/src/drivers/nic/virtio/component.h @@ -131,7 +131,7 @@ class Virtio_nic::Device : Noncopyable * 256kB of RAM. */ static const uint16_t DEFAULT_VQ_SIZE = 64; - static const uint16_t DEFAULT_VQ_BUF_SIZE = 2016; + static const uint16_t DEFAULT_VQ_BUF_SIZE = 2048; struct Rx_queue_traits {