Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion input/dpdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace ipxp {
class DpdkOptParser : public OptionsParser {
private:
static constexpr size_t DEFAULT_MBUF_BURST_SIZE = 64;
static constexpr size_t DEFAULT_MBUF_POOL_SIZE = 4096;
static constexpr size_t DEFAULT_MBUF_POOL_SIZE = 8192;
size_t pkt_buffer_size_;
size_t pkt_mempool_size_;
std::vector<uint16_t> port_numbers_;
Expand Down
8 changes: 7 additions & 1 deletion input/dpdk/dpdkDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "dpdkDevice.hpp"

#include <algorithm>
#include <chrono>
#include <cstring>
#include <iostream>
Expand Down Expand Up @@ -192,11 +193,13 @@ void DpdkDevice::initMemPools(uint16_t memPoolSize)

void DpdkDevice::setupRxQueues(uint16_t memPoolSize)
{
const uint16_t rxQueueSize = std::max(memPoolSize / 2, 1);

for (uint16_t rxQueueID = 0; rxQueueID < m_rxQueueCount; rxQueueID++) {
int ret = rte_eth_rx_queue_setup(
m_portID,
rxQueueID,
memPoolSize,
rxQueueSize,
rte_eth_dev_socket_id(m_portID),
nullptr,
m_memPools[rxQueueID]);
Expand All @@ -206,6 +209,9 @@ void DpdkDevice::setupRxQueues(uint16_t memPoolSize)
+ std::to_string(m_portID));
}
}

std::cerr << "DPDK RX queues for port " << m_portID << " set up. Size of each queue: "
<< rxQueueSize << std::endl;
}

void DpdkDevice::configureRSS()
Expand Down
Loading