[PATCH net-next 0/6] net: macb: Add TAPRIO traffic scheduling support

Vineeth Karumanchi posted 6 patches 2 months, 2 weeks ago
There is a newer version of this series
drivers/net/ethernet/cadence/macb.h      |  76 ++++++++
drivers/net/ethernet/cadence/macb_main.c | 228 ++++++++++++++++++++++-
2 files changed, 303 insertions(+), 1 deletion(-)
[PATCH net-next 0/6] net: macb: Add TAPRIO traffic scheduling support
Posted by Vineeth Karumanchi 2 months, 2 weeks ago
Implement Time-Aware Traffic Scheduling (TAPRIO) offload support
for Cadence MACB/GEM ethernet controllers to enable IEEE 802.1Qbv
compliant time-sensitive networking (TSN) capabilities.

Key features implemented:
- Complete TAPRIO qdisc offload infrastructure with TC_SETUP_QDISC_TAPRIO
- Hardware-accelerated time-based gate control for multiple queues
- Enhanced Scheduled Traffic (ENST) register configuration and management
- Gate state scheduling with configurable start times, on/off intervals
- Support for cycle-time based traffic scheduling with validation
- Hardware capability detection via MACB_CAPS_QBV flag
- Robust error handling and parameter validation
- Queue-specific timing register programming
  (ENST_START_TIME, ENST_ON_TIME, ENST_OFF_TIME)

Changes include:
- Add macb_taprio_setup_replace() for TAPRIO configuration
- Add macb_taprio_destroy() for cleanup and reset
- Add macb_setup_tc() as TC offload entry point
- Enable NETIF_F_HW_TC feature for QBV-capable hardware
- Add ENST register offsets to queue configuration

The implementation validates timing constraints against hardware limits,
supports per-queue gate mask configuration, and provides comprehensive
logging for debugging and monitoring. Hardware registers are programmed
atomically with proper locking to ensure consistent state.

Tested on Xilinx Versal platforms with QBV-capable MACB controllers.

Vineeth Karumanchi (6):
  net: macb: Define ENST hardware registers for time-aware scheduling
  net: macb: Integrate ENST timing parameters and hardware unit
    conversion
  net: macb: Add IEEE 802.1Qbv TAPRIO REPLACE command offload support
  net: macb: Implement TAPRIO DESTROY command offload for gate cleanup
  net: macb: Implement TAPRIO TC offload command interface
  net: macb: Add MACB_CAPS_QBV capability flag for IEEE 802.1Qbv support

 drivers/net/ethernet/cadence/macb.h      |  76 ++++++++
 drivers/net/ethernet/cadence/macb_main.c | 228 ++++++++++++++++++++++-
 2 files changed, 303 insertions(+), 1 deletion(-)

-- 
2.34.1