Skip to content

net: hinic3: Add a driver for Huawei 3rd gen NIC - sw and hw initialization

Fan Gong linux-doc lkml netdev 6 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest14 patches 3 repliesApplied 14/14
  2. v514 patches 7 repliesSuperseded
  3. v414 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v314 patches7 repliesSuperseded
v214 patches6 repliesSuperseded
v112 patches11 repliesSuperseded

Patches in v6 All 14 applied

#Subject and filesSizeRepliesApplied
1/14hinic3: HW initializationdrivers/net/ethernet/huawei/hinic3/hinic3_hwdev.c drivers/net/ethernet/huawei/hinic3/hinic3_hwif.c drivers/net/ethernet/huawei/hinic3/hinic3_hwif.h +2 more+316 -40 repliesApplied
2/14hinic3: HW management interfacesdrivers/net/ethernet/huawei/hinic3/Makefile drivers/net/ethernet/huawei/hinic3/hinic3_hw_cfg.c drivers/net/ethernet/huawei/hinic3/hinic3_hw_cfg.h +5 more+152 -00 repliesApplied
3/14hinic3: HW common function initializationdrivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.h drivers/net/ethernet/huawei/hinic3/hinic3_hw_intf.h +1 more+716 -10 repliesApplied
4/14hinic3: HW capability initializationdrivers/net/ethernet/huawei/hinic3/hinic3_hw_cfg.c drivers/net/ethernet/huawei/hinic3/hinic3_hw_cfg.h drivers/net/ethernet/huawei/hinic3/hinic3_hw_intf.h +1 more+115 -00 repliesApplied
5/14hinic3: Command Queue flush interfacesdrivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.h drivers/net/ethernet/huawei/hinic3/hinic3_hw_intf.h +3 more+124 -00 repliesApplied
6/14hinic3: Nic_io initializationdrivers/net/ethernet/huawei/hinic3/hinic3_hwdev.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.h +1 more+88 -30 repliesApplied
7/14hinic3: Queue pair endianness improvementsdrivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h drivers/net/ethernet/huawei/hinic3/hinic3_rx.c drivers/net/ethernet/huawei/hinic3/hinic3_rx.h +2 more+79 -690 repliesApplied
8/14hinic3: Queue pair resource initializationdrivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_io.h +4 more+749 -72 repliesApplied
9/14hinic3: Queue pair context initializationdrivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.c drivers/net/ethernet/huawei/hinic3/hinic3_hw_comm.h drivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h +5 more+782 -00 repliesApplied
10/14hinic3: Tx & Rx configurationdrivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c +5 more+197 -10 repliesApplied
11/14hinic3: Add Rss functiondrivers/net/ethernet/huawei/hinic3/Makefile drivers/net/ethernet/huawei/hinic3/hinic3_main.c drivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h +4 more+436 -10 repliesApplied
12/14hinic3: Add port managementdrivers/net/ethernet/huawei/hinic3/hinic3_mgmt_interface.h drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c +1 more+161 -00 repliesApplied
13/14hinic3: Fix missing napi->dev in netif_queue_set_napidrivers/net/ethernet/huawei/hinic3/hinic3_irq.c+1 -10 repliesApplied
14/14hinic3: Fix code style (Missing a blank line before return)drivers/net/ethernet/huawei/hinic3/hinic3_lld.c drivers/net/ethernet/huawei/hinic3/hinic3_nic_cfg.c drivers/net/ethernet/huawei/hinic3/hinic3_tx.c+8 -00 repliesApplied

Reviews trailers per patch

4 of 14 patches have a Reviewed-by or Acked-by.

PatchVadim FedorenkoSimon Horman
1/14
2/14
3/14
4/14
5/14
6/14R-b
7/14R-b R-b
8/14
9/14
10/14
11/14
12/14
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH net-next v06 00/14] net: hinic3: Add a driver for Huawei 3rd gen NIC - sw and hw initialization

This is [3/3] part of hinic3 Ethernet driver initial submission. With this patch hinic3 becomes a functional Ethernet driver.

The driver parts contained in this patch:
Memory allocation and initialization of the driver structures. Management interfaces initialization.
HW capabilities probing, initialization and setup using management interfaces.
Net device open/stop implementation and data queues initialization. Register VID:DID in PCI id_table.
Fix netif_queue_set_napi usage.

Changes:

PATCH 03 V01: https://lore.kernel.org/netdev/[email protected]

PATCH 03 V02: https://lore.kernel.org/netdev/[email protected]
* Remove extra memset 0 after kzalloc (Vadim Fedorenko)
* Remove another init function in hinic3_init_hwdev/hwif/nic_io (Vadim Fedorenko)
* Create a new separate patch of fixing code style (Vadim Fedorenko)
* Use bitmap_free instead of kfree (ALOK TIWARI)
* Add prefix "hinic3" to non-static functions and parse_* functions (Vadim Fedorenko)
* Init func_tbl_cfg to {} (Vadim Fedorenko)
* Extract endianess improvement from queue pair resource initialization (Vadim Fedorenko)
* Use kmalloc_array before overwrite rss_hkey on the very next line (Vadim Fedorenko)
* Remove extra key copy about hinic3_rss_set_hash_key (Vadim Fedorenko)
* Use netdev_rss_key_fill instead of static rss hash key for safety (Eric Dumazet)

PATCH 03 V03: https://lore.kernel.org/netdev/[email protected]
* Modify get_hwif_attr function for improving readability (Vadim Fedorenko)
* Add HINIC3_PCIE_LINK_DOWN errorcode to init_hwif_attr error handling (Vadim Fedorenko)

PATCH 03 V04: https://lore.kernel.org/netdev/[email protected]
* Use pci_enable_msix_range instead of pci_alloc_irq_vectors (Jakub Kicinski)
* Move defensive codes to place that they are set/loaded (Jakub Kicinski)
* Code format fixes: remove empty lines between error handling path (Jakub Kicinski)
* Remove redundant waiting sleep in hinic3_rx_tx_flush (Jakub Kicinski)
* Use ethtool_rxfh_indir_default for standalizing codes (Jakub Kicinski)
* Use netif_get_num_default_rss_queues instead of driver-local logic (Jakub Kicinski)
* Use netif_set_real_num_queues to set both TX and RX queues (Jakub Kicinski)

PATCH 03 V05: https://lore.kernel.org/netdev/[email protected]
* Merge comm_cmd_clear_doorbell & comm_cmd_clear_resource (Vadim Fedorenko)
* Merge hinic3_enable/disable_doorbell to hinic3_toggle_doorbel (Vadim Fedorenko)
* Update hinic3_Nic_io initialization commit message (Vadim Fedorenko)

PATCH 03 V06:
* Use array_size() instead of multipling directly (Simon Horman)
* Modify comment in hinic3_config_num_qps to improve readability (Simon Horman)

Fan Gong (14):
hinic3: HW initialization
hinic3: HW management interfaces
hinic3: HW common function initialization
hinic3: HW capability initialization
hinic3: Command Queue flush interfaces
hinic3: Nic_io initialization
hinic3: Queue pair endianness improvements
hinic3: Queue pair resource initialization
hinic3: Queue pair context initialization
hinic3: Tx & Rx configuration
hinic3: Add Rss function
hinic3: Add port management
hinic3: Fix missing napi->dev in netif_queue_set_napi
hinic3: Fix code style (Missing a blank line before return)

 drivers/net/ethernet/huawei/hinic3/Makefile   |   2 +
 .../ethernet/huawei/hinic3/hinic3_hw_cfg.c    | 168 ++++
 .../ethernet/huawei/hinic3/hinic3_hw_cfg.h    |   4 +
 .../ethernet/huawei/hinic3/hinic3_hw_comm.c   | 363 ++++++++
 .../ethernet/huawei/hinic3/hinic3_hw_comm.h   |  21 +
 .../ethernet/huawei/hinic3/hinic3_hw_intf.h   | 115 +++
 .../net/ethernet/huawei/hinic3/hinic3_hwdev.c | 541 ++++++++++-
 .../net/ethernet/huawei/hinic3/hinic3_hwif.c  | 269 ++++++
 .../net/ethernet/huawei/hinic3/hinic3_hwif.h  |  16 +
 .../net/ethernet/huawei/hinic3/hinic3_irq.c   |   2 +-
 .../net/ethernet/huawei/hinic3/hinic3_lld.c   |   9 +-
 .../net/ethernet/huawei/hinic3/hinic3_main.c  |   8 +-
 .../net/ethernet/huawei/hinic3/hinic3_mgmt.c  |  21 +
 .../net/ethernet/huawei/hinic3/hinic3_mgmt.h  |   2 +
 .../huawei/hinic3/hinic3_mgmt_interface.h     | 119 +++
 .../huawei/hinic3/hinic3_netdev_ops.c         | 426 ++++++++-
 .../ethernet/huawei/hinic3/hinic3_nic_cfg.c   | 152 +++
 .../ethernet/huawei/hinic3/hinic3_nic_cfg.h   |  20 +
 .../ethernet/huawei/hinic3/hinic3_nic_dev.h   |   5 +
 .../ethernet/huawei/hinic3/hinic3_nic_io.c    | 870 +++++++++++++++++-
 .../ethernet/huawei/hinic3/hinic3_nic_io.h    |  39 +-
 .../huawei/hinic3/hinic3_pci_id_tbl.h         |   9 +
 .../net/ethernet/huawei/hinic3/hinic3_rss.c   | 336 +++++++
 .../net/ethernet/huawei/hinic3/hinic3_rss.h   |  14 +
 .../net/ethernet/huawei/hinic3/hinic3_rx.c    | 226 ++++-
 .../net/ethernet/huawei/hinic3/hinic3_rx.h    |  38 +-
 .../net/ethernet/huawei/hinic3/hinic3_tx.c    | 184 +++-
 .../net/ethernet/huawei/hinic3/hinic3_tx.h    |  30 +-
 28 files changed, 3923 insertions(+), 86 deletions(-)
 create mode 100644 drivers/net/ethernet/huawei/hinic3/hinic3_mgmt.c
 create mode 100644 drivers/net/ethernet/huawei/hinic3/hinic3_pci_id_tbl.h
 create mode 100644 drivers/net/ethernet/huawei/hinic3/hinic3_rss.c
 create mode 100644 drivers/net/ethernet/huawei/hinic3/hinic3_rss.h

base-commit: b1c92cdf5af3198e8fbc1345a80e2a1dff386c02

Signature · 1 line
2.43.0