Skip to content

Commit 04b2f51

Browse files
authored
Merge pull request #275 from CESNET/dpdk-mempool-alignment
Dpdk: Add DPDK mbuf alignment to max_packet_size calculation
2 parents f6108ab + 54d599d commit 04b2f51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/input/dpdk/src/dpdkDevice.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ void DpdkDevice::initMemPools(uint16_t memPoolSize)
168168
{
169169
constexpr int MEMPOOL_CACHE_SIZE = 256;
170170
constexpr int VLAN_HDR_LEN = 4;
171-
const int max_packet_size = m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN;
171+
constexpr int DPDK_MBUF_ALIGN = 1024;
172+
const int max_packet_size
173+
= RTE_ALIGN_CEIL(m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN, DPDK_MBUF_ALIGN);
172174

173175
m_memPools.reserve(m_rxQueueCount);
174176

0 commit comments

Comments
 (0)