netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/14] net-next/yunsilicon: ADD Yunsilicon XSC Ethernet Driver
@ 2025-01-15 10:23 Xin Tian
  2025-01-15 10:22 ` [PATCH v3 01/14] net-next/yunsilicon: Add xsc driver basic framework Xin Tian
                   ` (13 more replies)
  0 siblings, 14 replies; 26+ messages in thread
From: Xin Tian @ 2025-01-15 10:23 UTC (permalink / raw)
  To: netdev
  Cc: leon, andrew+netdev, kuba, pabeni, edumazet, davem, jeff.johnson,
	przemyslaw.kitszel, weihg, wanry

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.

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):
  net-next/yunsilicon: Add xsc driver basic framework
  net-next/yunsilicon: Enable CMDQ
  net-next/yunsilicon: Add hardware setup APIs
  net-next/yunsilicon: Add qp and cq management
  net-next/yunsilicon: Add eq and alloc
  net-next/yunsilicon: Add pci irq
  net-next/yunsilicon: Init auxiliary device
  net-next/yunsilicon: Add ethernet interface
  net-next/yunsilicon: Init net device
  net-next/yunsilicon: Add eth needed qp and cq apis
  net-next/yunsilicon: ndo_open and ndo_stop
  net-next/yunsilicon: Add ndo_start_xmit
  net-next/yunsilicon: Add eth rx
  net-next/yunsilicon: add ndo_get_stats64

 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  |  632 ++++++
 .../ethernet/yunsilicon/xsc/common/xsc_cmdq.h |  215 ++
 .../ethernet/yunsilicon/xsc/common/xsc_core.h |  529 +++++
 .../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    | 1929 +++++++++++++++++
 .../net/ethernet/yunsilicon/xsc/net/xsc_eth.h |   56 +
 .../yunsilicon/xsc/net/xsc_eth_common.h       |  239 ++
 .../ethernet/yunsilicon/xsc/net/xsc_eth_rx.c  |  557 +++++
 .../yunsilicon/xsc/net/xsc_eth_stats.c        |   42 +
 .../yunsilicon/xsc/net/xsc_eth_stats.h        |   33 +
 .../ethernet/yunsilicon/xsc/net/xsc_eth_tx.c  |  295 +++
 .../yunsilicon/xsc/net/xsc_eth_txrx.c         |  185 ++
 .../yunsilicon/xsc/net/xsc_eth_txrx.h         |   90 +
 .../ethernet/yunsilicon/xsc/net/xsc_eth_wq.c  |   80 +
 .../ethernet/yunsilicon/xsc/net/xsc_eth_wq.h  |  179 ++
 .../net/ethernet/yunsilicon/xsc/net/xsc_pph.h |  176 ++
 .../ethernet/yunsilicon/xsc/net/xsc_queue.h   |  203 ++
 .../net/ethernet/yunsilicon/xsc/pci/Kconfig   |   16 +
 .../net/ethernet/yunsilicon/xsc/pci/Makefile  |   10 +
 .../net/ethernet/yunsilicon/xsc/pci/adev.c    |  109 +
 .../net/ethernet/yunsilicon/xsc/pci/adev.h    |   14 +
 .../net/ethernet/yunsilicon/xsc/pci/alloc.c   |  221 ++
 .../net/ethernet/yunsilicon/xsc/pci/alloc.h   |   15 +
 .../net/ethernet/yunsilicon/xsc/pci/cmdq.c    | 1555 +++++++++++++
 drivers/net/ethernet/yunsilicon/xsc/pci/cq.c  |  151 ++
 drivers/net/ethernet/yunsilicon/xsc/pci/cq.h  |   14 +
 drivers/net/ethernet/yunsilicon/xsc/pci/eq.c  |  334 +++
 drivers/net/ethernet/yunsilicon/xsc/pci/eq.h  |   46 +
 drivers/net/ethernet/yunsilicon/xsc/pci/hw.c  |  266 +++
 drivers/net/ethernet/yunsilicon/xsc/pci/hw.h  |   18 +
 .../net/ethernet/yunsilicon/xsc/pci/main.c    |  384 ++++
 .../net/ethernet/yunsilicon/xsc/pci/pci_irq.c |  419 ++++
 .../net/ethernet/yunsilicon/xsc/pci/pci_irq.h |   14 +
 drivers/net/ethernet/yunsilicon/xsc/pci/qp.c  |  189 ++
 drivers/net/ethernet/yunsilicon/xsc/pci/qp.h  |   15 +
 .../net/ethernet/yunsilicon/xsc/pci/vport.c   |   30 +
 45 files changed, 9556 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-02-13  2:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 10:23 [PATCH v3 00/14] net-next/yunsilicon: ADD Yunsilicon XSC Ethernet Driver Xin Tian
2025-01-15 10:22 ` [PATCH v3 01/14] net-next/yunsilicon: Add xsc driver basic framework Xin Tian
2025-01-15 15:54   ` Simon Horman
2025-01-16  7:03     ` tianx
2025-01-15 16:04   ` Simon Horman
2025-01-16  8:04     ` tianx
2025-01-16 10:53       ` Simon Horman
2025-01-15 10:22 ` [PATCH v3 02/14] net-next/yunsilicon: Enable CMDQ Xin Tian
2025-01-16 10:30   ` Przemek Kitszel
2025-02-13  2:09     ` tianx
2025-01-16 13:55   ` Simon Horman
2025-01-17  3:42     ` tianx
2025-01-17 13:33       ` Simon Horman
2025-01-15 10:22 ` [PATCH v3 03/14] net-next/yunsilicon: Add hardware setup APIs Xin Tian
2025-01-15 10:22 ` [PATCH v3 04/14] net-next/yunsilicon: Add qp and cq management Xin Tian
2025-01-17 13:45   ` Simon Horman
2025-01-15 10:22 ` [PATCH v3 05/14] net-next/yunsilicon: Add eq and alloc Xin Tian
2025-01-15 10:22 ` [PATCH v3 06/14] net-next/yunsilicon: Add pci irq Xin Tian
2025-01-15 10:22 ` [PATCH v3 07/14] net-next/yunsilicon: Init auxiliary device Xin Tian
2025-01-15 10:23 ` [PATCH v3 08/14] net-next/yunsilicon: Add ethernet interface Xin Tian
2025-01-15 10:23 ` [PATCH v3 09/14] net-next/yunsilicon: Init net device Xin Tian
2025-01-15 10:23 ` [PATCH v3 10/14] net-next/yunsilicon: Add eth needed qp and cq apis Xin Tian
2025-01-15 10:23 ` [PATCH v3 11/14] net-next/yunsilicon: ndo_open and ndo_stop Xin Tian
2025-01-15 10:23 ` [PATCH v3 12/14] net-next/yunsilicon: Add ndo_start_xmit Xin Tian
2025-01-15 10:23 ` [PATCH v3 13/14] net-next/yunsilicon: Add eth rx Xin Tian
2025-01-15 10:23 ` [PATCH v3 14/14] net-next/yunsilicon: add ndo_get_stats64 Xin Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).