Skip to content

Conversation

lucashc
Copy link
Contributor

@lucashc lucashc commented Mar 3, 2025

Increase MAX_CPUS from 256 to 512 to support higher cpu count systems.
Fixes #485

Copy link
Member

@tohojo tohojo left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Please add the information from the issue about which systems this affects to the commit message, and add a signed-off-by line as well.

Previously, MAX_CPUS was set to 256. This causes the tool to exit with a failure on systems with more than 256 CPUs.
For example, an AMD EPYC server with two AMD EPYC 9684X 96-Core Processors reports 384 CPUs to the kernel due to hyperthreading.
This fix allows such systems to run the xdpdump utility.

Signed-off-by: Lucas Crijns <[email protected]>
@lucashc
Copy link
Contributor Author

lucashc commented Mar 3, 2025

I added the requested changes and updated the commit message.
One more thought: The Linux kernel allows many more CPUs than just 512. For instance, the kernel of my Ubuntu 24.04 LTS has been configured to support 8192 CPUs. Should we increase it even further?
On the other hand, most common servers will not exceed 512 CPUs.

@lucashc lucashc requested a review from tohojo March 4, 2025 12:35
Copy link
Member

@tohojo tohojo left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

I don't think we should increase it further as this adds overhead for all systems (being a compile-time value). If we need to scale to a higher number of CPUs we should start sizing things dynamically at runtime (or maybe find some way to avoid the per-CPU stuff if possible).

@tohojo tohojo merged commit bf4e962 into xdp-project:main Mar 4, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase MAX_CPUS
2 participants