> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Paul > Greenwalt > Sent: 13 March 2025 19:16 > To: [email protected] > Cc: [email protected]; Greenwalt, Paul <[email protected]>; > Loktionov, Aleksandr <[email protected]> > Subject: [Intel-wired-lan] [PATCH iwl-next v3] ice: add E830 Earliest TxTime > First Offload support > > E830 supports Earliest TxTime First (ETF) hardware offload, which is > configured via the ETF Qdisc (see tc-etf(8)). ETF introduces a new Tx flow > mechanism that utilizes a timestamp ring (tstamp_ring) alongside the standard > Tx ring. This timestamp ring is used to indicate when hardware will transmit > a packet. > > The allocation and initialization of the timestamp ring occur when the > feature is enabled via tc-etf. Since the timestamp ring and Tx ring are > tightly coupled, both must be configured simultaneously. > > To support ETF, the following flags are introduced: > > - ICE_F_TXTIME: Device feature flag set for E830 NICs, indicating ETF support. > - ICE_FLAG_TXTIME: PF-level flag indicating whether ETF is enabled on any Tx queue. It is checked during ring allocation to determine if timestamp rings should be allocated and is also referenced when modifying queue count via ethtool -G. > - ICE_TX_FLAGS_TXTIME: Per-ring flag set when ETF is enabled and cleared when disabled for a specific Tx queue. It helps determine ETF status when transmitting timestamped packets and is used by ice_is_txtime_ena() to check if ETF is enabled on any Tx queue. > > Due to a hardware issue that can result in a malicious driver detection > event, additional timestamp descriptors are required when wrapping the > timestamp ring. Up to 64 additional timestamp descriptors are reserved, > reducing the available Tx descriptors. > > To accommodate this, ICE_MAX_NUM_DESC_BY_MAC is introduced, defining: > > - E830: Maximum Tx descriptor length of 8096 (8K - 32 - 64 for timestamp fetch descriptors). > - E810 and E82X: Maximum Tx descriptor length of 8160 (8K - 32) . > > Reviewed-by: Aleksandr Loktionov <[email protected]> > Co-developed-by: Alice Michael <[email protected]> > Signed-off-by: Alice Michael <[email protected]> > Signed-off-by: Paul Greenwalt <[email protected]> > --- > Changelog: > v2->v3: > - Fix const compiler warning. > - Fix spelling error in function header. > - Fix Changelog verions number. > v1->v2: > - Resolve patch apply isue. > - 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]/ > --- > drivers/net/ethernet/intel/ice/ice.h | 9 +- > .../net/ethernet/intel/ice/ice_adminq_cmd.h | 53 +++++ > drivers/net/ethernet/intel/ice/ice_base.c | 212 +++++++++++++++--- > drivers/net/ethernet/intel/ice/ice_base.h | 1 + > drivers/net/ethernet/intel/ice/ice_common.c | 118 ++++++++++ > drivers/net/ethernet/intel/ice/ice_common.h | 10 + > drivers/net/ethernet/intel/ice/ice_ethtool.c | 61 ++++- > .../net/ethernet/intel/ice/ice_hw_autogen.h | 3 + > .../net/ethernet/intel/ice/ice_lan_tx_rx.h | 42 ++++ > drivers/net/ethernet/intel/ice/ice_lib.c | 45 +++- > drivers/net/ethernet/intel/ice/ice_main.c | 174 +++++++++++++- > drivers/net/ethernet/intel/ice/ice_txrx.c | 129 ++++++++++- > drivers/net/ethernet/intel/ice/ice_txrx.h | 4 + > drivers/net/ethernet/intel/ice/ice_txrx_lib.h | 14 ++ > drivers/net/ethernet/intel/ice/ice_virtchnl.c | 2 +- > 15 files changed, 823 insertions(+), 54 deletions(-) >
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
