Kernel: Don't map NIC buffers as uncached

There is no need for them to be uncached. Having them as uncached killed
the networking performance, over 90% time was spent in kernel out of
which 80% was in checksum calculation and memcpy, half each (measured in
qemu with e1000e)
This commit is contained in:
2026-04-27 19:42:40 +03:00
parent ab8bcbec3e
commit 1486ad7aa5
2 changed files with 5 additions and 5 deletions

View File

@@ -107,7 +107,7 @@ namespace Kernel
BAN::ErrorOr<void> RTL8169::initialize_rx()
{
m_rx_buffer_region = TRY(DMARegion::create(m_rx_descriptor_count * s_buffer_size));
m_rx_buffer_region = TRY(DMARegion::create(m_rx_descriptor_count * s_buffer_size, PageTable::MemoryType::Normal));
m_rx_descriptor_region = TRY(DMARegion::create(m_rx_descriptor_count * sizeof(RTL8169Descriptor)));
for (size_t i = 0; i < m_rx_descriptor_count; i++)
@@ -144,7 +144,7 @@ namespace Kernel
BAN::ErrorOr<void> RTL8169::initialize_tx()
{
m_tx_buffer_region = TRY(DMARegion::create(m_tx_descriptor_count * s_buffer_size));
m_tx_buffer_region = TRY(DMARegion::create(m_tx_descriptor_count * s_buffer_size, PageTable::MemoryType::Normal));
m_tx_descriptor_region = TRY(DMARegion::create(m_tx_descriptor_count * sizeof(RTL8169Descriptor)));
for (size_t i = 0; i < m_tx_descriptor_count; i++)