Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] [HISI] Add Huawei Intelligent Network Card Driver:hinic3#824

Merged
opsiff merged 2 commits into
deepin-community:linux-6.6.yfrom
Avenger-285714:linux-6.6.y
May 30, 2025
Merged

[Deepin-Kernel-SIG] [linux 6.6-y] [HISI] Add Huawei Intelligent Network Card Driver:hinic3#824
opsiff merged 2 commits into
deepin-community:linux-6.6.yfrom
Avenger-285714:linux-6.6.y

Conversation

@Avenger-285714
Copy link
Copy Markdown
Member

net/hinic3:Add Huawei Intelligent Network Card Driver:hinic3

Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/377

符桂铭 and others added 2 commits May 30, 2025 12:03
The NIC driver supports the following features:
 *1. Supports IPv4/IPv6 TCP/UDP checksum, TSO, LRO offload and RSS
functions.
  2. Supports interrupt aggregation parameter configuration and
interrupt adaptation.
  3. Supports 802.1Q VLAN (Virtual Local Area Network) offloading
and filtering.
  4. Supports NIC SR-IOV (Single Root I/O Virtualization).
  5. Support PF promiscuous mode
  6. Supports VF QinQ mode.
  7. Supports VF link state configuration and QoS configuration.
  8. Support VF MAC address management.
  9. Support VF spoofchk check.
  10. Support port lighting.
  11. Support Ethernet mouth self-negotiation, support pause frame.

[ WangYuli: Support COMPILE_TEST and fix follow compile error: ]
  drivers/net/ethernet/huawei/hinic3/adapter/sw_cmdq/sw_cmdq_ops.c:78:34: error: expression does not compute the number of elements in this array; element type is 'u16' (aka 'unsigned short'), not 'u32' (aka 'unsigned int') [-Werror,-Wsizeof-array-div]
     78 |         size = sizeof(indir_tbl->entry) / sizeof(u32);
        |                       ~~~~~~~~~~~~~~~~  ^

Link: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel/pulls/377
signed-off-by:Fuguiming<fuguiming@huawei.com>
Co-developed-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
CONFIG_HINIC3 depends on ARM64 || X86_64 || COMPILE_TEST.
So only enable it for x86 and arm64.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
@Avenger-285714 Avenger-285714 requested review from Copilot and opsiff May 30, 2025 04:08
@deepin-ci-robot deepin-ci-robot requested a review from BLumia May 30, 2025 04:08
@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from avenger-285714. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces the new Huawei Intelligent Network Card Driver (HiNIC3) into the kernel, along with its supporting infrastructure such as CQM, CMDQ, bonding, and documentation updates. Key changes include:

  • Addition of complete driver source files under drivers/net/ethernet/huawei/hinic3 (including CQM, CMDQ, bonding, and adapter components).
  • Updates to Kconfig, Makefile, and defconfig files to integrate the new HiNIC3 driver.
  • New documentation in Documentation/networking/hinic3.rst and corresponding updates to the MAINTAINERS file.

Reviewed Changes

Copilot reviewed 146 out of 146 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
drivers/net/ethernet/huawei/hinic3/cqm/cqm_define.h Added macro mappings for CQM function names.
drivers/net/ethernet/huawei/hinic3/cqm/cqm_db.h Introduced new CQM database definitions and functions.
drivers/net/ethernet/huawei/hinic3/cqm/cqm_cmd.* Added new command buffer allocation, free, and send functions.
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bloomfilter.h Declares bloomfilter functions and definitions (with a minor spelling typo in the comments).
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.h Adds bitmap table functionalities for managing CQM objects.
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bat_cla.h New implementation for BAT/CLA handling.
drivers/net/ethernet/huawei/hinic3/bond/hinic3_bond.h New definitions for bonding interface and commands.
drivers/net/ethernet/huawei/hinic3/adapter/* Added software and hardware CMDQ operations implementations.
drivers/net/ethernet/huawei/hinic3/Makefile, Kconfig, defconfig files, Documentation/networking/hinic3.rst, MAINTAINERS Build system and documentation updates to include the new driver.

#include <linux/types.h>
#include <linux/mutex.h>

/* Bloomfilter entry size is 32B(256bit), whitch index is the 48-32-bit of the
Copy link

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

Typo in the comment: 'whitch' should be 'which'.

Suggested change
/* Bloomfilter entry size is 32B(256bit), whitch index is the 48-32-bit of the
/* Bloomfilter entry size is 32B(256bit), which index is the 48-32-bit of the

Copilot uses AI. Check for mistakes.
* This interface will mount a completion quantity, causing sleep.
* @ex_handle: device pointer that represents the PF
* @mod: command module
* @cmd:command type
Copy link

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment uses a full-width colon (':'); please replace it with the standard ASCII colon (':') for consistency.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@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.

We failed to fetch the diff for pull request #824

You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.

@Avenger-285714
Copy link
Copy Markdown
Member Author

@sourcery-ai review

Copy link
Copy Markdown

@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.

We failed to fetch the diff for pull request #824

You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.

@opsiff opsiff merged commit 962ab1f into deepin-community:linux-6.6.y May 30, 2025
6 of 7 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.

4 participants