Skip to content
Merged
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
4 changes: 3 additions & 1 deletion src/plugins/input/dpdk/src/dpdkDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ void DpdkDevice::initMemPools(uint16_t memPoolSize)
{
constexpr int MEMPOOL_CACHE_SIZE = 256;
constexpr int VLAN_HDR_LEN = 4;
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a comment explaining why DPDK_MBUF_ALIGN is set to 1024 and its relevance to mbuf alignment requirements.

Suggested change
constexpr int VLAN_HDR_LEN = 4;
constexpr int VLAN_HDR_LEN = 4;
// DPDK_MBUF_ALIGN ensures that mbufs are aligned to 1024 bytes, which is required
// for optimal performance and compatibility with DPDK and hardware requirements.

Copilot uses AI. Check for mistakes.
const int max_packet_size = m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN;
constexpr int DPDK_MBUF_ALIGN = 1024;
const int max_packet_size
= RTE_ALIGN_CEIL(m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN, DPDK_MBUF_ALIGN);

m_memPools.reserve(m_rxQueueCount);

Expand Down