This patch series introduces support for Earliest TxTime First (ETF)
hardware offload on Intel E830 network devices. ETF allows applications
to specify when packets should be transmitted, enabling precise timing
control for time-sensitive networking applications.
The implementation consists of two patches:
1. A preparatory patch that moves queue pair enable/disable functions
from ice_xsk.c to ice_base.c for reuse by the ETF implementation.
2. The main ETF implementation that adds comprehensive support for
hardware-accelerated timestamp-based packet transmission.
Key Features
- Hardware offload for Earliest TxTime First (ETF) Qdisc
- Per-queue configuration via tc-etf(8)
- Support for up to 2048 Tx queues with ETF capability
- Timestamp ring mechanism for precise transmission timing
- Dynamic enable/disable of ETF on individual queues
Hardware Details
E830 introduces a new Tx flow mechanism using a dedicated timestamp ring
alongside the standard Tx ring. The timestamp ring contains descriptors
that specify when hardware should transmit packets. Due to hardware
limitations, additional timestamp descriptors are reserved when wrapping
around the ring to prevent malicious driver detection events.
Configuration
ETF is configured per-queue using the standard tc-etf Qdisc (see
tc-etf(8)).
---
Changelog
v6->v7:
- Move tstamp_ring related member variables (tail, count, next_to_use,
desc) from ice_tx_ring to ice_tstamp_ring,
- Ignore ice_qp_dis() return value, and always attempt to enable the queue
via ice_qp_ena()
v5->v6:
- Fixed resource leak in error path
- Added input validation
- Update error handling logic for disable failures
- Move ice_qp_* functions to preparatory patch, and add coverletter
- Address code style issues (u32 vs u16, code flattening)
- Propagate error status from ice_set_txq_ctx_vmvf
- Removed unnecessary RDMA compatibility checks
v4->v5:
- Fix ! vs ~ issue reported by Smatch:
ice_txrx.c:192 ice_free_tx_tstamp_ring() warn: potential ! vs ~ typo
v3->v4:
- Move ice_tstamp_ring to a member of ice_tx_ring (Maciej).
- Add struct ice_tstamp_ring for timestamp ring management.
- Move tstsmp ring fast patch variables to ice_tx_ring
(i.e. tstamp_[next_to_use|count|tail|desc]).
- Allocate/configure Tx Time on a per Tx ring basis using
ice_qp_[ena|dis], add txtime_txqs bitmap and ice_is_txtime_ena()
helper function, update all Tx ring and tstamp inrg allocation and
configuration flows.
- Update commit message related to updated implementation/design.
v2->v3:
- Fix const compiler warning.
- Fix spelling error in function header.
- Fix Changelog version number.
v1->v2:
- Resolve patch apply issue.
- Fixes RCT, zero struct initialization, move bailout condition to top
of function, removed unnecessary newlines, and added use of
str_enable_disable.
v1:
https://patchwork.ozlabs.org/project/intel-wired-lan/patch/[email protected]/
Paul Greenwalt (2):
ice: move ice_qp_[ena|dis] for reuse
ice: add E830 Earliest TxTime First Offload support
drivers/net/ethernet/intel/ice/ice.h | 33 +-
.../net/ethernet/intel/ice/ice_adminq_cmd.h | 35 ++
drivers/net/ethernet/intel/ice/ice_base.c | 390 ++++++++++++++++--
drivers/net/ethernet/intel/ice/ice_base.h | 3 +
drivers/net/ethernet/intel/ice/ice_common.c | 78 ++++
drivers/net/ethernet/intel/ice/ice_common.h | 6 +
drivers/net/ethernet/intel/ice/ice_ethtool.c | 14 +-
.../net/ethernet/intel/ice/ice_hw_autogen.h | 3 +
.../net/ethernet/intel/ice/ice_lan_tx_rx.h | 41 ++
drivers/net/ethernet/intel/ice/ice_lib.c | 1 +
drivers/net/ethernet/intel/ice/ice_main.c | 109 ++++-
drivers/net/ethernet/intel/ice/ice_txrx.c | 173 +++++++-
drivers/net/ethernet/intel/ice/ice_txrx.h | 15 +
drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 14 +
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 2 +-
drivers/net/ethernet/intel/ice/ice_xsk.c | 153 +------
drivers/net/ethernet/intel/ice/ice_xsk.h | 22 +
17 files changed, 895 insertions(+), 197 deletions(-)
--
2.47.0