Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't mbuf pools account for MTU? #698

Open
AltraMayor opened this issue Jul 25, 2024 · 2 comments
Open

Shouldn't mbuf pools account for MTU? #698

AltraMayor opened this issue Jul 25, 2024 · 2 comments

Comments

@AltraMayor
Copy link
Owner

The current implementation of lib/net.c:create_pktmbuf_pool() ignores the interfaces' MTUs. This is not a problem because create_pktmbuf_pool() uses RTE_MBUF_DEFAULT_BUF_SIZE, which is ideal for the typical MTU of Gatekeeper, namely, 2048 bytes. Nevertheless, shouldn't create_pktmbuf_pool() account for the MTU instead of always using RTE_MBUF_DEFAULT_BUF_SIZE?

Once create_pktmbuf_pool() accounts for the MTU, can one remove the parameter .offloads = RTE_ETH_RX_OFFLOAD_SCATTER passed to KNI (i.e., Virtio-user) interfaces from cps/kni.c:setup_dpdk_interface()?

@Onepamopa
Copy link

I think having a static value makes it easier for the pool to be "memory-aligned" (if that's the correct way to describe it) - which makes it faster to access.

@AltraMayor
Copy link
Owner Author

AltraMayor commented Jul 26, 2024

Thanks for the feedback. Your feedback is well within the intention of opening this issue: accumulating information to decide how to address this question in the code. The code can adjust the size of that parameter to guarantee that the memory is aligned.

I'll wait for a production demand to drive the final solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants