Skip to content

[PWCI] "Extend NUMA nodes limit for examples"#604

Open
ovsrobot wants to merge 3 commits intomainfrom
series_36985
Open

[PWCI] "Extend NUMA nodes limit for examples"#604
ovsrobot wants to merge 3 commits intomainfrom
series_36985

Conversation

@ovsrobot
Copy link
Owner

@ovsrobot ovsrobot commented Jan 8, 2026

Auto-submission for "http://patchwork.dpdk.org/project/dpdk/list/?series=36985"

Summary by Sourcery

Enhancements:

  • Replace fixed NB_SOCKETS constants in PMD performance tests and example applications with RTE_MAX_NUMA_NODES to support systems with more NUMA nodes.

Summary by CodeRabbit

  • Improvements
    • Updated socket configuration to dynamically adapt to the system's NUMA node count, enabling improved compatibility across multi-socket systems with varying hardware configurations.

✏️ Tip: You can customize this high-level summary in your review settings.

Liangxing Wang added 3 commits January 8, 2026 03:48
For platforms with more than 8 NUMA nodes, examples l3fwd, l3fwd-graph,
and l3fwd-power fail when using cores on NUMA node 8 or above.

Use RTE_MAX_NUMA_NODES instead of 8 to extend NUMA nodes limit.

Cc: stable@dpdk.org

Signed-off-by: Liangxing Wang <wangliangxing@hygon.cn>
Signed-off-by: 0-day Robot <robot@bytheb.org>
Use RTE_MAX_NUMA_NODES instead of hardcoded 4 to extend NUMA nodes
limit.

Cc: stable@dpdk.org

Signed-off-by: Liangxing Wang <wangliangxing@hygon.cn>
Signed-off-by: 0-day Robot <robot@bytheb.org>
Use RTE_MAX_NUMA_NODES instead of hardcoded 2 to extend NUMA nodes
limit for pmd_perf_autotest.

Cc: stable@dpdk.org

Signed-off-by: Liangxing Wang <wangliangxing@hygon.cn>
Signed-off-by: 0-day Robot <robot@bytheb.org>
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 8, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Replaces hard-coded NB_SOCKETS limits in performance test and example applications with the generic RTE_MAX_NUMA_NODES constant so the code automatically supports the platform’s full NUMA node count.

File-Level Changes

Change Details Files
Use RTE_MAX_NUMA_NODES instead of fixed NB_SOCKETS values in test_pmd_perf performance test.
  • Replaced NB_SOCKETS definition value 2 with RTE_MAX_NUMA_NODES in the pmd perf test header area to match the platform NUMA configuration.
app/test/test_pmd_perf.c
Update example applications to derive NB_SOCKETS from RTE_MAX_NUMA_NODES rather than hard-coded limits.
  • Replaced NB_SOCKETS value 4 with RTE_MAX_NUMA_NODES in ipsec-secgw example header.
  • Replaced NB_SOCKETS value 8 with RTE_MAX_NUMA_NODES in l3fwd-graph main file.
  • Replaced NB_SOCKETS value 8 with RTE_MAX_NUMA_NODES in l3fwd-power main file.
  • Replaced NB_SOCKETS value 8 with RTE_MAX_NUMA_NODES in l3fwd header.
examples/ipsec-secgw/ipsec-secgw.h
examples/l3fwd-graph/main.c
examples/l3fwd-power/main.c
examples/l3fwd/l3fwd.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

The pull request systematically replaces five hardcoded NB_SOCKETS macro definitions with RTE_MAX_NUMA_NODES across test and example code, making socket configuration dynamic based on system NUMA topology rather than fixed values.

Changes

Cohort / File(s) Summary
Test Applications
app/test/test_pmd_perf.c
NB_SOCKETS macro changed from 2 to RTE_MAX_NUMA_NODES, affecting mbuf pool sizing and socket-index range validation
IPsec Example
examples/ipsec-secgw/ipsec-secgw.h
NB_SOCKETS macro changed from 4 to RTE_MAX_NUMA_NODES for compile-time NUMA-aware socket configuration
L3fwd Examples
examples/l3fwd*/main.c, examples/l3fwd/l3fwd.h
NB_SOCKETS macro changed from 8 to RTE_MAX_NUMA_NODES across three files, affecting memory pool allocation and per-socket data structures

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Five sockets stood fixed, but now they see,
RTE_MAX_NUMA_NODES sets them free!
From hardcoded constraints to dynamic grace,
The NUMA awareness finds its place. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing hardcoded NUMA node limits with RTE_MAX_NUMA_NODES across multiple example files to support more NUMA nodes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd60dcd and 06870fe.

📒 Files selected for processing (5)
  • app/test/test_pmd_perf.c
  • examples/ipsec-secgw/ipsec-secgw.h
  • examples/l3fwd-graph/main.c
  • examples/l3fwd-power/main.c
  • examples/l3fwd/l3fwd.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review
🔇 Additional comments (5)
examples/ipsec-secgw/ipsec-secgw.h (1)

12-12: LGTM!

Replacing the hardcoded value of 4 with RTE_MAX_NUMA_NODES correctly extends NUMA support beyond the previous artificial limit, enabling this example to work on platforms with more NUMA nodes.

app/test/test_pmd_perf.c (1)

18-18: LGTM!

Replacing the hardcoded value of 2 with RTE_MAX_NUMA_NODES allows this performance test to run on systems with more NUMA nodes. The existing bounds check at lines 244-248 correctly validates socket IDs against the new limit.

examples/l3fwd/l3fwd.h (1)

36-36: LGTM!

Replacing the hardcoded value of 8 with RTE_MAX_NUMA_NODES extends NUMA support for the l3fwd example to accommodate platforms with more NUMA nodes, consistent with the other changes in this PR.

examples/l3fwd-power/main.c (1)

118-118: LGTM!

Replacing the hardcoded value of 8 with RTE_MAX_NUMA_NODES correctly extends NUMA support for the l3fwd-power example. The existing bounds check at lines 2129-2133 properly validates socket IDs, and the pktmbuf_pool and lookup structure arrays will be appropriately sized.

examples/l3fwd-graph/main.c (1)

59-59: LGTM!

Replacing the hardcoded value of 8 with RTE_MAX_NUMA_NODES correctly extends NUMA support for the l3fwd-graph example. The bounds check at lines 661-665 validates socket IDs appropriately, and the pktmbuf_pool 2D array and ethdev_conf.mp_count assignment at line 1191 remain consistent with this change.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant