Skip to content

example-cnf | Improvements for Mellanox support #661

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

Merged
merged 1 commit into from
Jun 9, 2025
Merged

Conversation

ramperher
Copy link
Contributor

@ramperher ramperher commented Apr 30, 2025

SUMMARY
  • Added instructions for Mellanox interfaces support in example-cnf
  • Include comments about Mellanox support for DPDK and TRex
  • Allow the possibility to create the pods with privileged mode enabled, which is needed when using Mellanox
  • Since Mellanox could require the usage of SriovNetworkConfigPool resources to enable RDMA exclusive mode, nodes could be rebooted, then checking (properly) SriovNetworkNodeState after installing the SriovNetworkNodePolicy.
  • Update metaPlugins attribute in SriovNetwork, since it expects a JSON
ISSUE TYPE
  • Enhanced Feature
Tests

Privileged mode is used, metaPlugins are appended to the SRIOV config of this setup, and the check for SriovNetworkNodeState is correctly integrated.

Tested the ping between the grout pod created by the automation and another grout instance created manually, since TRex cannot be used with Mellanox cards:

grout# ping 192.168.104.60
reply from 192.168.104.60: icmp_seq=0 ttl=64 time=0.025 ms
reply from 192.168.104.60: icmp_seq=1 ttl=64 time=0.014 ms
grout# show trace count 50
--------- 13:56:50.673914819 cpu 3 ---------
control_input:
icmp_local_send:
ip_output: 192.168.104.62 > 192.168.104.60 ttl=64 proto=ICMP(1)
eth_output: 00:11:22:33:00:01 > 80:0a:0f:f1:89:01 type=IP(0x0800) iface=p0
port_tx: port=0 queue=2

--------- 13:56:50.673914819 cpu 1 ---------
port_rx: port=0 queue=1
eth_input: 80:0a:0f:f1:89:01 > 00:11:22:33:00:01 type=IP(0x0800) iface=p0
ip_input: 192.168.104.60 > 192.168.104.62 ttl=64 proto=ICMP(1)
ip_input_local:
icmp_input: echo reply id=25 seq=1
control_output:

Automation with grout worked in a regular cluster. Changes were not affecting the default behavior.

Test-Hints: no-check

@ramperher ramperher requested a review from a team as a code owner April 30, 2025 12:05
@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

from change #661:

  • no check (not a code change)

Copy link
Contributor

coderabbitai bot commented Apr 30, 2025

📝 Walkthrough

Walkthrough

This change introduces a new variable, ecd_enable_privileged_mode, across the example CNF deployment role. The variable, defaulting to false, allows configuration of container privileged mode, which is necessary for Mellanox network cards. Documentation is updated to explain its purpose and usage, especially in scenarios involving Mellanox cards and RDMA. Template files are modified to reference this variable for setting the privileged field dynamically, replacing previous hardcoded values. Additional tasks improve waiting logic for SR-IOV node states, and a YAML template adjustment ensures proper JSON serialization of metaPlugins.

Changes

Files/Paths Change Summary
roles/example_cnf_deploy/README.md Added ecd_enable_privileged_mode variable with detailed Mellanox usage notes and expanded NIC support information.
roles/example_cnf_deploy/defaults/main.yml Added ecd_enable_privileged_mode variable (default: false) with explanatory comments.
roles/example_cnf_deploy/templates/grout-cr.yaml.j2
roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2
Made privileged field dynamic using ecd_enable_privileged_mode variable instead of hardcoded false.
roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 Added dynamic privileged field set by ecd_enable_privileged_mode.
roles/check_resource/tasks/wait-sriov.yml Split wait task into two: added 60-second pause and refined readiness checks with JSON queries and explicit conditions.
roles/sriov_config/tasks/check_sriov_node_policy.yml Added a task to wait for SriovNetworkNodeState readiness after node policy confirmation.
roles/sriov_config/templates/sriov-network.yml.j2 Changed metaPlugins rendering to output JSON instead of a quoted string.

Suggested reviewers

  • nocturnalastro
  • tkrishtop

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

from change #661:

  • no check (not a code change)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
roles/example_cnf_deploy/README.md (1)

117-119: Fix plural agreement and streamline phrasing.
Change "other type of cards" to "other types of cards" and tighten the Mellanox sentence for clarity.

- This configuration is related to Intel cards. If you are using other type of cards, you need to apply the corresponding modifications (`device_id` and `vendor` will change, among others). For example, [for Mellanox cards](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/networking/hardware-networks#example-vf-use-in-dpdk-mode-mellanox_using-dpdk-and-rdma), you need to use `netdevice` instead of `vfio-pci`, and also enable RDMA (`is_rdma: true`).
+ This configuration is related to Intel cards. If you are using other types of cards, apply the corresponding modifications (`device_id` and `vendor` will change, among others`). For Mellanox cards, use `netdevice` instead of `vfio-pci` and enable RDMA (`is_rdma: true`) (see https://docs.redhat.com/.../example-vf-use-in-dpdk-mode-mellanox_using-dpdk-and-rdma).
🧰 Tools
🪛 LanguageTool

[grammar] ~117-~117: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~117-~117: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 789a4ab and b834ef8.

📒 Files selected for processing (5)
  • roles/example_cnf_deploy/README.md (2 hunks)
  • roles/example_cnf_deploy/defaults/main.yml (1 hunks)
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 (1 hunks)
🧰 Additional context used
🪛 LanguageTool
roles/example_cnf_deploy/README.md

[grammar] ~117-~117: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~117-~117: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Sanity Check (stable-2.17)
  • GitHub Check: Sanity Check (stable-2.9)
  • GitHub Check: Ansible-lint Check
🔇 Additional comments (6)
roles/example_cnf_deploy/defaults/main.yml (2)

70-74: Well-documented new feature for Mellanox support

The comment clearly explains why privileged mode is necessary for Mellanox cards, providing good context about the netdevice vs vfio-pci difference and the requirement to access /dev/vfio/vfio. The reference to the Red Hat solution article is particularly helpful.


74-74: Sensible security default

Setting ecd_enable_privileged_mode to false by default is a good security practice - privileged mode should only be enabled when specifically needed.

roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2 (1)

7-7: Consistent implementation of privileged mode toggle

The template now properly uses the ecd_enable_privileged_mode variable instead of a hardcoded value, making the TestPMD configuration consistent with the other components.

roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 (1)

19-19: Good placement for privileged mode setting

The privileged field is appropriately added to the spec section, making it clear how to configure the TRex server with privileged mode when needed for Mellanox cards.

roles/example_cnf_deploy/templates/grout-cr.yaml.j2 (1)

7-7: Consistent implementation across all templates

The Grout template now uses the same variable-based approach as the other templates, ensuring consistent behavior across all components when Mellanox cards are used.

roles/example_cnf_deploy/README.md (1)

48-48: Excellent addition of ecd_enable_privileged_mode.
This new variable clearly documents the need for privileged mode when using Mellanox cards and why a hostPath volume alone is insufficient.

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

from change #661:

  • no check (not a code change)

1 similar comment
@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

from change #661:

  • no check (not a code change)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
roles/example_cnf_deploy/README.md (3)

48-48: Fix missing article for clarity.
Insert “the” before “host” for grammatical correctness:

…requires access to /dev/vfio/vfio from the host. Using a volume…
🧰 Tools
🪛 LanguageTool

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... requires access to /dev/vfio/vfio from host. Using a volume with hostPath is not en...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


116-116: Use plural for ‘types’ and refine phrasing.
Change “other type of cards” to “other types of cards” and consider rephrasing to reduce repetition (e.g., “If you are using cards from other vendors…”).

🧰 Tools
🪛 LanguageTool

[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)


117-117: Improve reminder discoverability.
Consider moving the Mellanox privileged-mode note closer to the ecd_enable_privileged_mode variable above or adding an inline link for easier reference.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b834ef8 and fc4b8a9.

📒 Files selected for processing (5)
  • roles/example_cnf_deploy/README.md (2 hunks)
  • roles/example_cnf_deploy/defaults/main.yml (1 hunks)
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2
  • roles/example_cnf_deploy/defaults/main.yml
🧰 Additional context used
🪛 LanguageTool
roles/example_cnf_deploy/README.md

[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... requires access to /dev/vfio/vfio from host. Using a volume with hostPath is not en...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Sanity Check (stable-2.17)
  • GitHub Check: Sanity Check (stable-2.9)
  • GitHub Check: Ansible-lint Check

Copy link

@ramperher ramperher changed the title example-cnf | Document other SRIOV setups and enable privileged mode example-cnf | Improvements for Mellanox support Apr 30, 2025
@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

@ramperher ramperher marked this pull request as draft April 30, 2025 14:34
@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

@dcibot
Copy link
Collaborator

dcibot commented Apr 30, 2025

@dcibot
Copy link
Collaborator

dcibot commented May 1, 2025

@ramperher
Copy link
Contributor Author

recheck

Copy link

@dcibot
Copy link
Collaborator

dcibot commented May 6, 2025

@dcibot
Copy link
Collaborator

dcibot commented May 7, 2025

@ramperher
Copy link
Contributor Author

recheck

Copy link

@dcibot
Copy link
Collaborator

dcibot commented May 7, 2025

@ramperher
Copy link
Contributor Author

recheck

Copy link

@dcibot
Copy link
Collaborator

dcibot commented May 12, 2025

@ramperher
Copy link
Contributor Author

recheck

@ramperher ramperher marked this pull request as ready for review June 6, 2025 11:55
Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
roles/example_cnf_deploy/README.md (2)

48-48: Nit: Improve grammar and clarity in ecd_enable_privileged_mode description

The sentence is a bit long and has a comma before “because,” plus “from host” should be “on the host.” Consider this more concise phrasing:

-| ecd_enable_privileged_mode            | false                                                                                           | no       | Enable container privileged mode, instead of setting specific capabilities. This is required when using Mellanox cards, because it requires access to /dev/vfio/vfio from host since it uses netdevice instead of vfio-pci. To achieve that, using a volume with hostPath is not enough, so that privileged mode is required (see [this](https://access.redhat.com/solutions/6560521) for an example of this). |
+| ecd_enable_privileged_mode            | false                                                                                           | no       | Enable container privileged mode instead of setting specific capabilities. Required for Mellanox cards as they use netdevice instead of vfio-pci and need access to /dev/vfio/vfio on the host. A hostPath volume alone is insufficient, so privileged mode is necessary (see [this](https://access.redhat.com/solutions/6560521)). |
🧰 Tools
🪛 LanguageTool

[formatting] ~48-~48: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...is is required when using Mellanox cards, because it requires access to /dev/vfio/vfio fr...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... requires access to /dev/vfio/vfio from host since it uses netdevice instead of vfio...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


116-116: Nit: Correct plural form for “type of cards”

Use “types of cards” to agree in number:

-This configuration is related to Intel cards. If you are using other type of cards, you need to apply the corresponding modifications (`device_id` and `vendor` will change, among others).
+This configuration applies to Intel cards. If you use other types of cards, adjust the corresponding parameters (`device_id`, `vendor`, etc.).
🧰 Tools
🪛 LanguageTool

[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc4b8a9 and db51d5a.

📒 Files selected for processing (8)
  • roles/check_resource/tasks/wait-sriov.yml (1 hunks)
  • roles/example_cnf_deploy/README.md (2 hunks)
  • roles/example_cnf_deploy/defaults/main.yml (1 hunks)
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 (1 hunks)
  • roles/sriov_config/tasks/check_sriov_node_policy.yml (1 hunks)
  • roles/sriov_config/templates/sriov-network.yml.j2 (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2
  • roles/example_cnf_deploy/defaults/main.yml
🧰 Additional context used
🪛 LanguageTool
roles/example_cnf_deploy/README.md

[formatting] ~48-~48: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...is is required when using Mellanox cards, because it requires access to /dev/vfio/vfio fr...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~48-~48: You might be missing the article “the” here.
Context: ... requires access to /dev/vfio/vfio from host since it uses netdevice instead of vfio...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)


[style] ~124-~124: Consider using “unable” to avoid wordiness.
Context: ...urrent setup, when launching TRex, it's not able to find the requested interfaces. Acco...

(NOT_ABLE_PREMIUM)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Sanity Check (stable-2.17)
  • GitHub Check: Sanity Check (stable-2.9)
  • GitHub Check: Ansible-lint Check
🔇 Additional comments (5)
roles/example_cnf_deploy/README.md (1)

118-118: Docs: Emphasize Mellanox privileged mode requirement

The blockquote clearly highlights the need for privileged mode when using Mellanox cards. This callout aligns with the newly added variable and is easy to spot. Great addition!

roles/sriov_config/templates/sriov-network.yml.j2 (1)

20-20: Good fix for JSON serialization consistency!

Adding | to_json ensures metaPlugins is properly serialized as JSON, consistent with other fields like capabilities and ipam in this template.

roles/sriov_config/tasks/check_sriov_node_policy.yml (1)

35-43: Excellent addition for robust SR-IOV orchestration!

This task properly handles the scenario where SR-IOV policy changes trigger node reboots. The retry/delay calculation matches the existing pattern, and the comments clearly explain the purpose.

roles/check_resource/tasks/wait-sriov.yml (2)

2-4: Smart addition of initial pause!

The 60-second pause gives SriovNetworkNodeState time to initiate the update process before checking readiness conditions.


6-25: Great refactoring for improved clarity!

The explicit JSON query variables and granular condition checks make this much more readable and maintainable than the previous complex filter approach. The underscore prefix for the register variable follows good conventions.

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

@ramperher
Copy link
Contributor Author

Testing is finished, this is ready for review.

@ramperher
Copy link
Contributor Author

recheck

@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

from change #661:

  • no check (not a code change)

1 similar comment
@dcibot
Copy link
Collaborator

dcibot commented Jun 6, 2025

from change #661:

  • no check (not a code change)

Copy link

Copy link
Contributor

@manurodriguez manurodriguez 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 all the testing and documention in respective Jira tickets, LGTM

@ramperher ramperher enabled auto-merge June 9, 2025 07:59
@ramperher
Copy link
Contributor Author

recheck

@dcibot
Copy link
Collaborator

dcibot commented Jun 9, 2025

from change #661:

  • no check (not a code change)

1 similar comment
@dcibot
Copy link
Collaborator

dcibot commented Jun 9, 2025

from change #661:

  • no check (not a code change)

Copy link

@dcibot
Copy link
Collaborator

dcibot commented Jun 9, 2025

from change #661:

  • no check (not a code change)

1 similar comment
@dcibot
Copy link
Collaborator

dcibot commented Jun 9, 2025

from change #661:

  • no check (not a code change)

Copy link

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
roles/example_cnf_deploy/README.md (2)

48-48: Remove unnecessary comma before "because".

The clause after "because" is essential, so the comma before it can be dropped for smoother flow.

🧰 Tools
🪛 LanguageTool

[formatting] ~48-~48: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...is is required when using Mellanox cards, because it requires access to /dev/vfio/vfio fr...

(COMMA_BEFORE_BECAUSE)


116-118: Streamline Mellanox guidance and fix grammar.

  • Change "other type of cards" → "other types of cards".
  • Consolidate the privileged-mode note into the main sentence and reduce repetition.

Example diff:

- This configuration is related to Intel cards. If you are using other type of cards, you need to apply the corresponding modifications (`device_id` and `vendor` will change, among others). For example, [for Mellanox cards](…), you need to use `netdevice` instead of `vfio-pci`, and also enable RDMA (`is_rdma: true`). It's also recommended to use `need_vhost_net: true`, and in case you want to include RDMA subsystem, you can do it with `meta_plugins: '{"type": "rdma"}'`.
- > Remember that Mellanox requires containers to run in privileged mode. Enable it with `ecd_enable_privileged_mode: true`.
+ This configuration applies to Intel cards. For other types of cards, update `device_id`, `vendor`, etc. For Mellanox cards, use `netdevice` instead of `vfio-pci`, enable RDMA (`is_rdma: true`), set `need_vhost_net: true`, and optionally include the RDMA subsystem via `meta_plugins: '{"type": "rdma"}'`. Note that Mellanox NICs require privileged mode (`ecd_enable_privileged_mode: true`) to access `/dev/vfio/vfio`.
🧰 Tools
🪛 LanguageTool

[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db51d5a and ec7cdb6.

📒 Files selected for processing (8)
  • roles/check_resource/tasks/wait-sriov.yml (1 hunks)
  • roles/example_cnf_deploy/README.md (2 hunks)
  • roles/example_cnf_deploy/defaults/main.yml (1 hunks)
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2 (1 hunks)
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2 (1 hunks)
  • roles/sriov_config/tasks/check_sriov_node_policy.yml (1 hunks)
  • roles/sriov_config/templates/sriov-network.yml.j2 (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • roles/example_cnf_deploy/templates/grout-cr.yaml.j2
  • roles/sriov_config/tasks/check_sriov_node_policy.yml
  • roles/example_cnf_deploy/defaults/main.yml
  • roles/example_cnf_deploy/templates/testpmd-cr.yaml.j2
  • roles/example_cnf_deploy/templates/trex-server-cr.yaml.j2
  • roles/sriov_config/templates/sriov-network.yml.j2
  • roles/check_resource/tasks/wait-sriov.yml
🧰 Additional context used
🪛 LanguageTool
roles/example_cnf_deploy/README.md

[formatting] ~48-~48: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...is is required when using Mellanox cards, because it requires access to /dev/vfio/vfio fr...

(COMMA_BEFORE_BECAUSE)


[grammar] ~116-~116: In this context, ‘type’ should agree in number with the noun after ‘of’.
Context: ... to Intel cards. If you are using other type of cards, you need to apply the corresponding mo...

(TYPE_OF_PLURAL)


[style] ~116-~116: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...mode-mellanox_using-dpdk-and-rdma), you need to use netdevice instead of vfio-pci, ...

(REP_NEED_TO_VB)


[style] ~124-~124: Consider using “unable” to avoid wordiness.
Context: ...urrent setup, when launching TRex, it's not able to find the requested interfaces. Acco...

(NOT_ABLE_PREMIUM)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Ansible-lint Check
  • GitHub Check: Sanity Check (stable-2.18)
  • GitHub Check: Sanity Check (stable-2.9)

@ramperher ramperher added this pull request to the merge queue Jun 9, 2025
Merged via the queue into main with commit 369df0f Jun 9, 2025
8 checks passed
@ramperher ramperher deleted the example-cnf-nics branch June 9, 2025 09:19
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.

3 participants