Skip to content

Add Mellanox ConnectX-3 NIC support for kernel 6.12#3969

Merged
sairon merged 6 commits into
home-assistant:devfrom
greyltc:mlx4
Mar 25, 2025
Merged

Add Mellanox ConnectX-3 NIC support for kernel 6.12#3969
sairon merged 6 commits into
home-assistant:devfrom
greyltc:mlx4

Conversation

@greyltc
Copy link
Copy Markdown
Contributor

@greyltc greyltc commented Mar 24, 2025

I think #3775 was mistakenly left out of the jump to the 6.12 kernel

Summary by CodeRabbit

  • New Features
    • Integrated support for Mellanox ConnectX-3 network cards, enhancing hardware compatibility and ensuring improved network performance for supported devices.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 24, 2025

📝 Walkthrough

Walkthrough

This pull request updates the kernel configuration for PCI device support to include Mellanox ConnectX-3 network interface cards. The changes add support for the MLX4 Ethernet driver as a module, enable the second generation MLX4 core driver, and explicitly disable MLX4 debug support. These modifications ensure that systems using Mellanox hardware are correctly configured through the kernel build.

Changes

File Change Summary
buildroot-external/kernel/v6.12.y/.../device-support-pci.config Added configuration options: CONFIG_MLX4_EN=m, CONFIG_MLX4_CORE_GEN2=y, and the comment # CONFIG_MLX4_DEBUG is not set for Mellanox NIC support

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 15e59ea and 852705d.

📒 Files selected for processing (1)
  • buildroot-external/kernel/v6.12.y/device-support-pci.config (1 hunks)
🔇 Additional comments (1)
buildroot-external/kernel/v6.12.y/device-support-pci.config (1)

29-32:

Details

❓ Verification inconclusive

Validate Mellanox ConnectX-3 NIC Support Configurations

The changes correctly introduce support for Mellanox ConnectX-3 NICs as follows:

  • Line 29-30: The header comment and CONFIG_MLX4_EN=m enable the Mellanox MLX4 Ethernet driver as a module.
  • Line 31: The comment # CONFIG_MLX4_DEBUG is not set appropriately disables debug support, which can help avoid unnecessary overhead in production environments.
  • Line 32: The option CONFIG_MLX4_CORE_GEN2=y enables the second-generation core driver built into the kernel.

Suggestions:

  • Module vs. Built-in: Verify whether the Mellanox MLX4 core driver (CONFIG_MLX4_CORE_GEN2) should be built-in (y) or modular (m) for your use case. Consistency between module options and built-in options can be important for system management and driver loading policies.
  • Documentation Reference: Consider adding a reference (in the commit message or an inline comment) to the upstream documentation or guidelines that recommend these specific settings for kernel 6.12. This can be valuable for future maintainers.

Below is a shell script to extract and verify the snippet (lines 29–32) from the configuration file:

Please run the above script and share the results so that we can confirm the snippet’s current state before finalizing the rewritten review comment.


🏁 Script executed:

#!/bin/bash
FILE="buildroot-external/kernel/v6.12.y/device-support-pci.config"

if [ -f "$FILE" ]; then
    echo "Extracting lines 29-32 from $FILE:"
    sed -n '29,32p' "$FILE"
else
    echo "Error: File $FILE not found!"
fi

Length of output: 508


Mellanox ConnectX-3 NIC Support Configurations Verified

The configuration in buildroot-external/kernel/v6.12.y/device-support-pci.config (lines 29–32) correctly implements support for Mellanox ConnectX-3 NICs:

  • Header & Modular Driver: The comment and setting CONFIG_MLX4_EN=m correctly enable the Mellanox MLX4 Ethernet driver as a module.
  • Debug Disabled: The comment # CONFIG_MLX4_DEBUG is not set confirms that debug support is intentionally disabled.
  • Core Driver: The option CONFIG_MLX4_CORE_GEN2=y enables the second-generation core driver built into the kernel.

Suggestions:

  • Module vs. Built-in Decision: Double-check if the Mellanox MLX4 core driver (CONFIG_MLX4_CORE_GEN2) should be configured as built-in (y) or as a module (m) to maintain consistency with your system management approach.
  • Reference Documentation: Consider linking to relevant upstream documentation or guidelines (in your commit message or as an inline comment) to justify these settings for kernel version 6.12, which will help future maintainers.

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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Copy link
Copy Markdown
Member

@sairon sairon left a comment

Choose a reason for hiding this comment

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

Indeed, sorry for that. #3775 was merged when #3767 was being worked on and your change wasn't backported to that PR.

@sairon sairon added linux Linux kernel related issue board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/ova Open Virtual Appliance (Virtual Machine) labels Mar 25, 2025
@sairon sairon changed the title add Mellanox ConnectX-3 NIC support for kernel 6.12 Add Mellanox ConnectX-3 NIC support for kernel 6.12 Mar 25, 2025
@sairon sairon merged commit 73b6cce into home-assistant:dev Mar 25, 2025
This was referenced Mar 27, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/ova Open Virtual Appliance (Virtual Machine) cla-signed linux Linux kernel related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants