Skip to content

Commit 343b665

Browse files
committed
vmxnet3: Use larger queues (512+512)
1 parent 9b49adf commit 343b665

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/drivers/vmxnet3.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ inline void mmio_write32(uintptr_t location, uint32_t value)
106106

107107
vmxnet3::vmxnet3(hw::PCI_Device& d) :
108108
Link(Link_protocol{{this, &vmxnet3::transmit}, mac()},
109-
2048, 2048 /* half-page buffer size */),
109+
1024, 2048 /* half-page buffer size */),
110110
pcidev(d)
111111
{
112112
INFO("vmxnet3", "Driver initializing (rev=%#x)", d.rev_id());
@@ -330,8 +330,7 @@ void vmxnet3::refill(rxring_state& rxq)
330330
bool added_buffers = false;
331331
int old_value = rxq.producers;
332332

333-
while (rxq.prod_count < VMXNET3_RX_FILL
334-
&& bufstore().available() != 0)
333+
while (rxq.prod_count < VMXNET3_RX_FILL)
335334
{
336335
size_t i = rxq.producers % vmxnet3::NUM_RX_DESC;
337336
const uint32_t generation =

src/drivers/vmxnet3.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class vmxnet3 : public net::Link_layer<net::Ethernet>
3030
using Link_protocol = Link::Protocol;
3131
static const int ETH_FRAME_LEN = 1514;
3232
static const int NUM_RX_QUEUES = 1;
33-
static const int NUM_TX_DESC = 128;
34-
static const int NUM_RX_DESC = 128;
33+
static const int NUM_TX_DESC = 256;
34+
static const int NUM_RX_DESC = 256;
3535

3636
static std::unique_ptr<Nic> new_instance(hw::PCI_Device& d)
3737
{ return std::make_unique<vmxnet3>(d); }

0 commit comments

Comments
 (0)