[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <eed857bc-1d8f-4d3d-aeaa-868b6957ddca@yunsilicon.com>
Date: Fri, 7 Mar 2025 18:40:47 +0800
From: "Xin Tian" <tianx@...silicon.com>
To: <netdev@...r.kernel.org>, <horms@...nel.org>, <kuba@...nel.org>
Cc: <leon@...nel.org>, <andrew+netdev@...n.ch>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <davem@...emloft.net>,
<jeff.johnson@....qualcomm.com>, <przemyslaw.kitszel@...el.com>,
<weihg@...silicon.com>, <wanry@...silicon.com>, <jacky@...silicon.com>,
<parthiban.veerasooran@...rochip.com>, <masahiroy@...nel.org>,
<kalesh-anakkur.purayil@...adcom.com>, <geert+renesas@...der.be>
Subject: Re: [PATCH net-next v8 00/14] xsc: ADD Yunsilicon XSC Ethernet Driver
Hi, Jakub, Simon, all
Our patch set is quite large, and the feedback so far has mainly focused on
the first 7 patches, with less attention on the later ones.
To make it easier to review and merge, I'm considering splitting the
patch set
into two parts: submitting the PCI driver now and the Ethernet driver
in a later series.
Would this approach be better? Is it appropriate to submit a PCI driver
without actual functionality to net-next?
Thanks,
Xin
On 2025/3/7 18:09, Xin Tian wrote:
> The patch series adds the xsc driver, which will support the YunSilicon
> MS/MC/MV series of network cards. These network cards offer support for
> high-speed Ethernet and RDMA networking, with speeds of up to 200Gbps.
>
> The Ethernet functionality is implemented by two modules. One is a
> PCI driver(xsc_pci), which provides PCIe configuration,
> CMDQ service (communication with firmware), interrupt handling,
> hardware resource management, and other services, while offering
> common interfaces for Ethernet and future InfiniBand drivers to
> utilize hardware resources. The other is an Ethernet driver(xsc_eth),
> which handles Ethernet interface configuration and data
> transmission/reception.
>
> - Patches 1-7 implement the PCI driver
> - Patches 8-14 implement the Ethernet driver
>
> This submission is the first phase, which includes the PF-based Ethernet
> transmit and receive functionality. Once this is merged, we will submit
> additional patches to implement support for other features, such as SR-IOV,
> ethtool support, and a new RDMA driver.
>
> Change v7->v8:
> Link to v7: https://lore.kernel.org/netdev/20250228154122.216053-1-tianx@yunsilicon.com/
> 1. add Kconfig NET_VENDOR_YUNSILICON depneds on COMPILE_TEST (Jakub)
> 2. rm unnecessary "default n" (Jakub)
> 3. select PAGE_POOL in ETH driver (Jakub)
> 4. simplify dma_mask set (Jakub)
> 5. del pci_state and pci_state_mutex (Kalesh)
> 6. I checked and droped intf_state and int_state_mutex too
> 7. del some no need lables in patch1 (Kalesh)
> 8. ensure consistent label naming throughout the patchset (Simon)
> 9. WARN_ONCE instead of meaningless comments (Simon)
> 10. nits
>
> Change v6->v7:
> Link to v6: https://lore.kernel.org/netdev/20250227082558.151093-1-tianx@yunsilicon.com/
> 1. use _pool_zalloc/vzalloc instead of (_pool_alloc/vmalloc + memset 0)
> 2. correct kfree for kvmalloc memory
> 3. del comment using NULL adapter pointer
> 4. correct num_dma type to int in xsc_eth_tx.c
> - Jakub Kicinski
>
> Change v5->v6:
> Link to v5: https://lore.kernel.org/netdev/20250224172416.2455751-1-tianx@yunsilicon.com/
> 1. fix error return in xsc_adev_init
> - Jakub Kicinski
> 2. comment style // -> /* ... */
> 3. remove XSC_ADEV_IDX_MAX, and use ARRAY_SIZE() instead
> 4. kcalloc for array alloc instead of kzalloc
> - Leon Romanovsky
> 5. prefetch/perfetchw to net_prefetch/net_prefetch
> - Joe Damato
>
> Changes v4->v5:
> Link to v4: https://lore.kernel.org/netdev/20250213091402.2067626-1-tianx@yunsilicon.com/
> 1. free xsc_adev in release callback
> - Leon Romanovsky
> 2. Add more detailed description for patches
> 3. use FIELD_PREP() and FIELD_GET() instead of XSC_SET/GET_FIELD
> 4. fix sparse complains about endian and types
> 5. use unsigned types for unsigned values
> 6. del BITS_PER_LONG == 64 check in xsc_buf_alloc
> 7. use GENMASK and DIV_ROUND_UP to replace the unclear code
> - Simon Horman
>
> Changes v3->v4:
> Link to v3: https://lore.kernel.org/netdev/20250115102242.3541496-1-tianx@yunsilicon.com/
> 1. pci_ioremap_bar returns a negative value in pci_init.
> 2. Adjust the declaration order to follow the reverse xmastree rule.
> 3. Split lines that exceed 80 columns.
> 4. Use XSC_SET_FIELD and XSC_GET_FIELD instead of bitfields.
> - Simon Horman
> 5. Use big-endian consistently in cmds
> 6. Add comments for sem and rsv0.
> 7. Change mode to enum in xsc_cmd, and rename bitmask to cmd_entry_mask.
> 8. Remove unnecessary header files such as kernel.h and init.h.
> 9. Add the xsc prefix to function names.
> 10. Return ENOSPC if alloc_ent fails.
> 11. Adjust the position of free_cmd.
> 12. Separate different categories of #include statements with blank lines.
> 13. Use status instead of admin_status xsc_event_set_port_admin_status_mbox_in
> - Przemek Kitszel
>
> Changes v2->v3:
> Link to v2: https://lore.kernel.org/netdev/20241230101513.3836531-1-tianx@yunsilicon.com/
> 1. Use auxiliary bus for ethernet functionality.
> - Leon Romanovsky comments
> 2. Remove netdev from struct xsc_core_device, as it can be accessed via eth_priv.
> - Andrew Lunn comments
>
> Changes v1->v2:
> Link to v1: https://lore.kernel.org/netdev/20241218105023.2237645-1-tianx@yunsilicon.com/
> 1. Remove the last two patches to reduce the total code submitted.
> - Jakub Kicinski comments
> 2. Remove the custom logging interfaces and switch to using
> pci_xxx/netdev_xxx logging interfaces. Delete the related
> module parameters.
> 3. No use of inline functions in .c files.
> 4. Remove unnecessary license information.
> 5. Remove unnecessary void casts.
> - Andrew Lunn comments
> 6. Use double underscore (__) for header file macros.
> 7. Fix the depend field in Kconfig.
> 8. Add sign-off for co-developers.
> 9. use string directly in MODULE_DESCRIPTION
> 10. Fix poor formatting issues in the code.
> 11. Modify some macros that don't use the XSC_ prefix.
> 12. Remove unused code from xsc_cmd.h that is not part of this patch series.
> 13. No comma after items in a complete enum.
> 14. Use the BIT() macro to define constants related to bit operations.
> 15. Add comments to clarify names like ver, cqe, eqn, pas, etc.
> - Przemek Kitszel comments
>
> Changes v0->v1:
> 1. name xsc_core_device as xdev instead of dev
> 2. modify Signed-off-by tag to Co-developed-by
> 3. remove some obvious comments
> 4. remove unnecessary zero-init and NULL-init
> 5. modify bad-named goto labels
> 6. reordered variable declarations according to the RCT rule
> - Przemek Kitszel comments
> 7. add MODULE_DESCRIPTION()
> - Jeff Johnson comments
> 8. remove unnecessary dev_info logs
> 9. replace these magic numbers with #defines in xsc_eth_common.h
> 10. move code to right place
> 11. delete unlikely() used in probe
> 12. remove unnecessary reboot callbacks
> - Andrew Lunn comments
>
> Xin Tian (14):
> xsc: Add xsc driver basic framework
> xsc: Enable command queue
> xsc: Add hardware setup APIs
> xsc: Add qp and cq management
> xsc: Add eq and alloc
> xsc: Init pci irq
> xsc: Init auxiliary device
> xsc: Add ethernet interface
> xsc: Init net device
> xsc: Add eth needed qp and cq apis
> xsc: ndo_open and ndo_stop
> xsc: Add ndo_start_xmit
> xsc: Add eth reception data path
> xsc: add ndo_get_stats64
>
> MAINTAINERS | 7 +
> drivers/net/ethernet/Kconfig | 1 +
> drivers/net/ethernet/Makefile | 1 +
> drivers/net/ethernet/yunsilicon/Kconfig | 26 +
> drivers/net/ethernet/yunsilicon/Makefile | 8 +
> .../yunsilicon/xsc/common/xsc_auto_hw.h | 94 +
> .../ethernet/yunsilicon/xsc/common/xsc_cmd.h | 630 ++++++
> .../ethernet/yunsilicon/xsc/common/xsc_cmdq.h | 234 ++
> .../ethernet/yunsilicon/xsc/common/xsc_core.h | 500 +++++
> .../yunsilicon/xsc/common/xsc_device.h | 77 +
> .../yunsilicon/xsc/common/xsc_driver.h | 25 +
> .../ethernet/yunsilicon/xsc/common/xsc_pp.h | 38 +
> .../net/ethernet/yunsilicon/xsc/net/Kconfig | 17 +
> .../net/ethernet/yunsilicon/xsc/net/Makefile | 9 +
> .../net/ethernet/yunsilicon/xsc/net/main.c | 1984 +++++++++++++++++
> .../net/ethernet/yunsilicon/xsc/net/xsc_eth.h | 55 +
> .../yunsilicon/xsc/net/xsc_eth_common.h | 239 ++
> .../ethernet/yunsilicon/xsc/net/xsc_eth_rx.c | 601 +++++
> .../yunsilicon/xsc/net/xsc_eth_stats.c | 46 +
> .../yunsilicon/xsc/net/xsc_eth_stats.h | 34 +
> .../ethernet/yunsilicon/xsc/net/xsc_eth_tx.c | 321 +++
> .../yunsilicon/xsc/net/xsc_eth_txrx.c | 188 ++
> .../yunsilicon/xsc/net/xsc_eth_txrx.h | 91 +
> .../ethernet/yunsilicon/xsc/net/xsc_eth_wq.c | 80 +
> .../ethernet/yunsilicon/xsc/net/xsc_eth_wq.h | 187 ++
> .../net/ethernet/yunsilicon/xsc/net/xsc_pph.h | 180 ++
> .../ethernet/yunsilicon/xsc/net/xsc_queue.h | 206 ++
> .../net/ethernet/yunsilicon/xsc/pci/Kconfig | 14 +
> .../net/ethernet/yunsilicon/xsc/pci/Makefile | 10 +
> .../net/ethernet/yunsilicon/xsc/pci/adev.c | 115 +
> .../net/ethernet/yunsilicon/xsc/pci/adev.h | 14 +
> .../net/ethernet/yunsilicon/xsc/pci/alloc.c | 234 ++
> .../net/ethernet/yunsilicon/xsc/pci/alloc.h | 17 +
> .../net/ethernet/yunsilicon/xsc/pci/cmdq.c | 1568 +++++++++++++
> drivers/net/ethernet/yunsilicon/xsc/pci/cq.c | 155 ++
> drivers/net/ethernet/yunsilicon/xsc/pci/cq.h | 14 +
> drivers/net/ethernet/yunsilicon/xsc/pci/eq.c | 340 +++
> drivers/net/ethernet/yunsilicon/xsc/pci/eq.h | 46 +
> drivers/net/ethernet/yunsilicon/xsc/pci/hw.c | 283 +++
> drivers/net/ethernet/yunsilicon/xsc/pci/hw.h | 18 +
> .../net/ethernet/yunsilicon/xsc/pci/main.c | 326 +++
> .../net/ethernet/yunsilicon/xsc/pci/pci_irq.c | 426 ++++
> .../net/ethernet/yunsilicon/xsc/pci/pci_irq.h | 14 +
> drivers/net/ethernet/yunsilicon/xsc/pci/qp.c | 194 ++
> drivers/net/ethernet/yunsilicon/xsc/pci/qp.h | 14 +
> .../net/ethernet/yunsilicon/xsc/pci/vport.c | 32 +
> 46 files changed, 9713 insertions(+)
> create mode 100644 drivers/net/ethernet/yunsilicon/Kconfig
> create mode 100644 drivers/net/ethernet/yunsilicon/Makefile
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_auto_hw.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_cmd.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_cmdq.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_device.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_driver.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_pp.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/Kconfig
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/Makefile
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/main.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_common.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_rx.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_stats.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_stats.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_tx.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_txrx.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_txrx.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_wq.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_eth_wq.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_pph.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/net/xsc_queue.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/Kconfig
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/Makefile
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/adev.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/adev.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/alloc.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/alloc.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/cmdq.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/cq.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/cq.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/eq.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/eq.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/hw.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/hw.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/main.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/pci_irq.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/qp.c
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/qp.h
> create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/vport.c
>
> --
> 2.43.0
Powered by blists - more mailing lists