Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v9 0/4] net: rnpgbe: Add TX/RX and link status support
@ 2026-08-14 11:13 Dong Yibo
  2026-08-14 11:13 ` [PATCH net-next v9 1/4] net: rnpgbe: Add interrupt handling Dong Yibo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dong Yibo @ 2026-08-14 11:13 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, vadim.fedorenko,
	u.kleine-koenig
  Cc: netdev, linux-kernel, dong100, yaojun

Hi maintainers,

This patch series adds the packet transmission, reception, and link status
management features to the RNPGBE driver, building upon the previously
introduced mailbox communication and basic driver infrastructure.

The series introduces:
- MSI-X/MSI interrupt handling with NAPI support
- TX path with scatter-gather DMA and completion handling
- RX path with page pool buffer management
- Firmware link-event processing and carrier management

These changes enable the RNPGBE driver to support basic TX/RX
network operations.

---
Changelog:
v8 -> v9:
[patch 1/4]:
1. Remove the unused MSI mode flag and separate the q_vector array index
   from the hardware interrupt vector number. (sashiko-nipa)
2. Read back a valid per-ring interrupt mask register once after masking
   all queues to flush posted writes. (sashiko-nipa)
3. Document that TX and RX rings are allocated as pairs and share interrupt
   control registers. (sashiko-nipa)
4. Remove redundant ring checks before scheduling NAPI. (sashiko-nipa)
5. Fix the kernel-doc descriptions for the q_vector and ring
   parameters. (sashiko-nipa)
6. Make rnpgbe_down() and rnpgbe_close() idempotent to avoid repeated NAPI
   disabling and IRQ release during shutdown. (sashiko-nipa)
7. Drop the unnecessary pci_set_drvdata(pdev, NULL) change from this
   series. (sashiko-nipa)
8. Queue mailbox event handling on system_percpu_wq, the supported
   replacement for system_wq.
[patch 2/4]:
1. Use DMA_STATUS_REG to wait for TX read and write AXI transactions
   to complete before releasing TX DMA mappings. (sashiko-nipa)
2. Disable TX AXI read/write paths while programming TX ring registers,
   and enable them only after ring configuration is
   complete. (sashiko-nipa)
3. Enforce the hardware-required 33-byte minimum packet length in the
   chip-specific transmit entry point. (sashiko-nipa)
4. Advertise NETIF_F_HIGHDMA only when a DMA mask wider than 32 bits is
   available, while retaining the 32-bit DMA fallback. (sashiko-nipa)
5. Update TX cleanup documentation and comments to describe the DMA stop
   and ring reconfiguration ordering. (sashiko-nipa)
6. Reword the DMA mask setup as a prerequisite for the new TX DMA path,
   rather than a fix for a previously unused streaming DMA mask.
   (sashiko-nipa)
[patch 3/4]:
1. Replace per-ring delayed work and system_wq usage for RX refill
   recovery with one timer shared by each q_vector; cancel the timer
   before RX cleanup and q_vector teardown. (sashiko-nipa)
2. Publish the RX tail after every refill attempt, including when the
   first page allocation fails, to avoid using a stale tail after
   reopen. (sashiko-nipa)
3. Track packet-level NAPI work separately from successful RX statistics;
   count complete dropped, malformed, skb-build, and header-cleanup
   failures against the NAPI budget. (sashiko-nipa)
4. Clarify that 16 descriptors are reserved in the fixed 512-descriptor
   ring, leaving at most 496 descriptors posted to hardware. (sashiko-nipa)
5. Correct the kernel-doc for rnpgbe_process_skb_fields(). (sashiko-nipa)
6. Wait for RX DMA to become idle before disabling RX AXI and releasing
   RX mappings, and flush the posted register write. (sashiko-nipa)
7. Preserve the NAPI completion contract during teardown; do not complete
   NAPI when the full poll budget was consumed, and do not re-enable queue
   interrupts after the device is down. (sashiko-nipa)
[patch 4/4]:
1. Take a lock-protected snapshot of link, speed, and duplex after
   consuming a pending link event, avoiding mismatched link-state
   data. (sashiko-gemini)
2. Set carrier off before registering the netdev, so the initial
   RTM_NEWLINK reports no carrier. (sashiko-gemini)
3. Serialize resetting the firmware link-state snapshot with clearing the
   driver DOWN state, so a link event cannot be discarded during
   open. (sashiko-nipa)
4. Fail ndo_open() when firmware port-up notification or link-report
   enablement fails. (sashiko-nipa)
5. Validate firmware link events before updating cached link
   state. (sashiko-nipa)
6. Clarify the driver-owned link-state snapshot, firmware link speed
   encoding, and LINK_REPORT_EN mailbox payload layout. (sashiko-nipa)
7. Document firmware link-event rate limiting and mailbox worker
   behavior. (sashiko-nipa)
8. Queue the link service task on system_percpu_wq.
9. Document that link-up enables the GMAC receiver and bypasses its frame
   filter so the chip-level packet filter can receive all frames.
   (sashiko-nipa)
10. Include the LLDP status bit in the documented driver-owned link-state
    fields and reset semantics. (sashiko-nipa)

Links:
v1: https://lore.kernel.org/netdev/20260325091204.94015-1-dong100@mucse.com/
v2: https://lore.kernel.org/netdev/20260403025713.527841-1-dong100@mucse.com/
v3: https://lore.kernel.org/netdev/20260507081539.171844-1-dong100@mucse.com/
v4: https://lore.kernel.org/netdev/20260526033539.164061-1-dong100@mucse.com/
v5: https://lore.kernel.org/netdev/20260528023150.239532-1-dong100@mucse.com/
v6: https://lore.kernel.org/netdev/20260604112750.769215-1-dong100@mucse.com/
v7: https://lore.kernel.org/netdev/20260611100036.36370-1-dong100@mucse.com/
v8: https://lore.kernel.org/netdev/20260731120322.895955-1-dong100@mucse.com/

---

Dong Yibo (4):
  net: rnpgbe: Add interrupt handling
  net: rnpgbe: Add basic TX packet transmission support
  net: rnpgbe: Add RX packet reception support
  net: rnpgbe: Add link status handling support

 drivers/net/ethernet/mucse/Kconfig            |    1 +
 drivers/net/ethernet/mucse/rnpgbe/Makefile    |    3 +-
 drivers/net/ethernet/mucse/rnpgbe/rnpgbe.h    |  196 +-
 .../net/ethernet/mucse/rnpgbe/rnpgbe_chip.c   |   45 +-
 drivers/net/ethernet/mucse/rnpgbe/rnpgbe_hw.h |   30 +
 .../net/ethernet/mucse/rnpgbe/rnpgbe_lib.c    | 2253 +++++++++++++++++
 .../net/ethernet/mucse/rnpgbe/rnpgbe_lib.h    |   87 +
 .../net/ethernet/mucse/rnpgbe/rnpgbe_main.c   |  124 +-
 .../net/ethernet/mucse/rnpgbe/rnpgbe_mbx.c    |   32 +-
 .../net/ethernet/mucse/rnpgbe/rnpgbe_mbx.h    |    1 +
 .../net/ethernet/mucse/rnpgbe/rnpgbe_mbx_fw.c |  206 ++
 .../net/ethernet/mucse/rnpgbe/rnpgbe_mbx_fw.h |   51 +
 12 files changed, 3006 insertions(+), 23 deletions(-)
 create mode 100644 drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.c
 create mode 100644 drivers/net/ethernet/mucse/rnpgbe/rnpgbe_lib.h

-- 
2.25.1


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

end of thread, other threads:[~2026-08-14 11:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 11:13 [PATCH net-next v9 0/4] net: rnpgbe: Add TX/RX and link status support Dong Yibo
2026-08-14 11:13 ` [PATCH net-next v9 1/4] net: rnpgbe: Add interrupt handling Dong Yibo
2026-08-14 11:13 ` [PATCH net-next v9 2/4] net: rnpgbe: Add basic TX packet transmission support Dong Yibo
2026-08-14 11:13 ` [PATCH net-next v9 3/4] net: rnpgbe: Add RX packet reception support Dong Yibo
2026-08-14 11:13 ` [PATCH net-next v9 4/4] net: rnpgbe: Add link status handling support Dong Yibo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox