Skip to content

Conversation

@SiskaPavel
Copy link
Collaborator

Fixes issues related to incorrect MTU handling and associated mbuf allocation failures.

@SiskaPavel SiskaPavel requested a review from Copilot May 7, 2025 10:08
@SiskaPavel SiskaPavel self-assigned this May 7, 2025
@SiskaPavel SiskaPavel added the bug label May 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the calculation of the maximum packet size to incorporate DPDK mbuf alignment, addressing MTU handling issues and preventing mbuf allocation failures.

  • Introduces a constant for DPDK mbuf alignment (DPDK_MBUF_ALIGN)
  • Updates max_packet_size calculation using RTE_ALIGN_CEIL for alignment compliance
Comments suppressed due to low confidence (1)

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

  • [nitpick] If DPDK_MBUF_ALIGN is likely to be reused in other parts of the project, consider moving it to a more central configuration or header file to ensure consistency.
= RTE_ALIGN_CEIL(m_mtuSize + RTE_ETHER_HDR_LEN + VLAN_HDR_LEN, DPDK_MBUF_ALIGN);

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.
@SiskaPavel SiskaPavel requested review from Lukas955 and removed request for Lukas955 May 7, 2025 10:08
@SiskaPavel SiskaPavel merged commit 04b2f51 into master May 7, 2025
7 checks passed
@SiskaPavel SiskaPavel deleted the dpdk-mempool-alignment branch May 7, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants