From: "Xin Tian" <tianx@yunsilicon.com>
To: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Leon Romanovsky" <leon@kernel.org>,
"Junxian Huang" <huangjunxian6@hisilicon.com>
Cc: <weihg@yunsilicon.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
<kerneljasonxing@gmail.com>
Subject: [PATCH v2 00/11] net/xsc: add the Yunsilicon XSC ethernet driver
Date: Thu, 26 Nov 2026 22:57:47 +0800 [thread overview]
Message-ID: <20261126145711.70868-1-tianx@yunsilicon.com> (raw)
This is the first series of v2 for the Yunsilicon XSC converged network
adapter (PCI vendor 0x1f67). Responding to the review of v1, this is a
much smaller, self-contained ethernet-only driver: about 5.7k added
lines, down from the combined ethernet and RDMA driver in v1.
The driver is split into the same two modules as before, which share the
xsc prefix and talk over the auxiliary bus:
1. xsc_pci (CONFIG_YUNSILICON_XSC_PCI) - the PCI core driver. Owns the
PCI function, the command queue, the event queues, MSI-X and the
CQ/QP resource pools, and publishes one auxiliary device per PF.
Patches 01-06.
2. xsc_eth (CONFIG_YUNSILICON_XSC_ETH) - the ethernet driver. Binds to
the auxiliary device, registers the netdev, brings up a single TX/RX
queue pair with NAPI and page_pool, and tracks the link state from
the port events. Patches 07-11.
Patch 01 adds the MAINTAINERS entry together with the Kbuild plumbing.
To keep the series within the requested size, this first series
deliberately omits RDMA, statistics, offloads (TSO/checksum), RSS and the
configuration interfaces (ethtool, module parameters, ndo_change_mtu).
Only the compressed-BAR PF form of the hardware is supported. These will
be submitted as follow-up series once the base driver is accepted.
The series is split so that every patch builds cleanly with GCC 8.3.1 and
W=1. The core patches add the command queue, capabilities, event queues
and resource pools incrementally, and the ethernet patches register the
netdev first, then add the channel and link handling, and finally the TX
and RX data paths.
Changes since v1:
- Split the combined ethernet+RDMA driver into a minimal ethernet-only
first series, about 5.7k added lines instead of 10k, as requested.
Addressing the netdev review of the v1 netdev patch:
- Register the link event handler before register_netdevice(), keying the
interface off xdev->eth_priv which is set before registration.
- Use ether_addr_copy() to copy the firmware MAC address.zaizuo
- Drop the unreachable NULL checks in the remove path.
- Move xsc_cqwq_get_cqe() out of the header into xsc_eth_txrx.c.
- Drop the unreachable "already opened"/"not opened" branches in
ndo_open()/ndo_stop(); the netdev core serialises these via rtnl.
- Keep xsc_set_port_admin_status() void: it runs after open/close, a
rejected call is legitimate (VF, port_link_en, multi-function
arbitration, old firmware), and the real carrier comes from the link
events and QUERY_VPORT_STATE, so we log and carry on.
Xin Tian (11):
net/xsc: add Yunsilicon XSC ethernet PCI driver skeleton
net/xsc: add doorbell and cmdq MMIO accessors
net/xsc: add the command queue
net/xsc: query HCA capabilities and reset function resources
net/xsc: add event queues and MSI-X
net/xsc: add CQ and QP helpers
net/xsc: add the ethernet netdev
net/xsc: add the single TX/RX channel
net/xsc: report link state changes
net/xsc: add the transmit path
net/xsc: add the receive path
MAINTAINERS | 7 +
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/yunsilicon/Kconfig | 27 +
drivers/net/ethernet/yunsilicon/Makefile | 9 +
.../ethernet/yunsilicon/xsc/common/xsc_cmd.h | 560 ++++++++
.../ethernet/yunsilicon/xsc/common/xsc_core.h | 311 +++++
.../ethernet/yunsilicon/xsc/common/xsc_reg.h | 23 +
.../net/ethernet/yunsilicon/xsc/net/Kconfig | 17 +
.../net/ethernet/yunsilicon/xsc/net/Makefile | 9 +
.../net/ethernet/yunsilicon/xsc/net/main.c | 1161 +++++++++++++++++
.../net/ethernet/yunsilicon/xsc/net/xsc_eth.h | 33 +
.../yunsilicon/xsc/net/xsc_eth_common.h | 117 ++
.../ethernet/yunsilicon/xsc/net/xsc_eth_rx.c | 210 +++
.../ethernet/yunsilicon/xsc/net/xsc_eth_tx.c | 87 ++
.../yunsilicon/xsc/net/xsc_eth_txrx.c | 95 ++
.../yunsilicon/xsc/net/xsc_eth_txrx.h | 36 +
.../ethernet/yunsilicon/xsc/net/xsc_eth_wq.c | 80 ++
.../ethernet/yunsilicon/xsc/net/xsc_eth_wq.h | 150 +++
.../ethernet/yunsilicon/xsc/net/xsc_queue.h | 103 ++
.../net/ethernet/yunsilicon/xsc/pci/Kconfig | 16 +
.../net/ethernet/yunsilicon/xsc/pci/Makefile | 9 +
.../net/ethernet/yunsilicon/xsc/pci/adev.c | 133 ++
.../net/ethernet/yunsilicon/xsc/pci/adev.h | 14 +
.../net/ethernet/yunsilicon/xsc/pci/alloc.c | 225 ++++
.../net/ethernet/yunsilicon/xsc/pci/alloc.h | 18 +
drivers/net/ethernet/yunsilicon/xsc/pci/cmd.c | 708 ++++++++++
drivers/net/ethernet/yunsilicon/xsc/pci/cmd.h | 87 ++
drivers/net/ethernet/yunsilicon/xsc/pci/cq.c | 130 ++
drivers/net/ethernet/yunsilicon/xsc/pci/cq.h | 13 +
.../ethernet/yunsilicon/xsc/pci/doorbell.c | 148 +++
drivers/net/ethernet/yunsilicon/xsc/pci/eq.c | 300 +++++
drivers/net/ethernet/yunsilicon/xsc/pci/eq.h | 38 +
.../net/ethernet/yunsilicon/xsc/pci/main.c | 282 ++++
.../net/ethernet/yunsilicon/xsc/pci/pci_irq.c | 345 +++++
.../net/ethernet/yunsilicon/xsc/pci/pci_irq.h | 16 +
drivers/net/ethernet/yunsilicon/xsc/pci/qp.c | 180 +++
drivers/net/ethernet/yunsilicon/xsc/pci/qp.h | 14 +
.../net/ethernet/yunsilicon/xsc/pci/vport.c | 36 +
39 files changed, 5749 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_cmd.h
create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_core.h
create mode 100644 drivers/net/ethernet/yunsilicon/xsc/common/xsc_reg.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_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_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/cmd.c
create mode 100644 drivers/net/ethernet/yunsilicon/xsc/pci/cmd.h
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/doorbell.c
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/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
next reply other threads:[~2026-11-26 14:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 14:57 Xin Tian [this message]
2026-11-26 14:57 ` [PATCH v2 01/11] net/xsc: add Yunsilicon XSC ethernet PCI driver Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 02/11] net/xsc: add doorbell and cmdq MMIO accessors Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 03/11] net/xsc: add the command queue Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 04/11] net/xsc: query HCA capabilities and reset function Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 05/11] net/xsc: add event queues and MSI-X Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 06/11] net/xsc: add CQ and QP helpers Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 07/11] net/xsc: add the ethernet netdev Xin Tian
2026-11-27 15:57 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 08/11] net/xsc: add the single TX/RX channel Xin Tian
2026-11-27 15:58 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 09/11] net/xsc: report link state changes Xin Tian
2026-11-27 15:58 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 10/11] net/xsc: add the transmit path Xin Tian
2026-11-27 15:58 ` netdev-bot+sashiko
2026-11-26 14:57 ` [PATCH v2 11/11] net/xsc: add the receive path Xin Tian
2026-11-27 15:58 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126145711.70868-1-tianx@yunsilicon.com \
--to=tianx@yunsilicon.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangjunxian6@hisilicon.com \
--cc=jgg@ziepe.ca \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=weihg@yunsilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®