[v1,1/2] net/ice: add tstamp descriptor

Message ID 20250117093938.1184042-2-soumyadeep.hore@intel.com (mailing list archive)
State Accepted
Delegated to: Bruce Richardson
Headers
Series Update Base code for TXPP Implementation |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Soumyadeep Hore Jan. 17, 2025, 9:39 a.m. UTC
From: Paul Greenwalt <paul.greenwalt@intel.com>

The Tx packet pacing (TXPP) tstamp queue descriptor is a 32bit format.
- Tx queue descriptor ring index, bits 12:0
- Time Stamp, bits 31:13

Add struct ice_ts_desc to hold the 32bit descriptor.

Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
 drivers/net/ice/base/ice_lan_tx_rx.h | 6 ++++++
 1 file changed, 6 insertions(+)
  

Patch

diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index 209b8e5c43..bcc6e9a716 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1269,6 +1269,12 @@  struct ice_tx_drbell_q_ctx {
 };
 #pragma pack()
 
+/* Tx time stamp descriptor */
+struct ice_ts_desc {
+	__le32 tx_desc_idx_tstamp;
+};
+#define ICE_TS_DESC(R, i) (&(((struct ice_ts_desc *)((R)->desc))[i]))
+
 /* The ice_ptype_lkup table is used to convert from the 10-bit ptype in the
  * hardware to a bit-field that can be used by SW to more easily determine the
  * packet type.