---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    8 ++++++++
 include/uapi/linux/if_xdp.h                       |    1 +
 tools/include/uapi/linux/if_xdp.h                 |    1 +
 3 files changed, 10 insertions(+)

Index: linux-5.18.0-rt11/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
===================================================================
--- linux-5.18.0-rt11.orig/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ linux-5.18.0-rt11/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2412,6 +2412,14 @@ static bool stmmac_xdp_xmit_zc(struct st
 				       true, priv->mode, true, true,
 				       xdp_desc.len);
 
+               if (tx_q->tbs & STMMAC_TBS_EN && xdp_desc.txtime > 0) {
+                       struct dma_edesc *edesc = &tx_q->dma_entx[entry];
+                       struct timespec64 ts =
+                               ns_to_timespec64(xdp_desc.txtime);
+
+                       stmmac_set_desc_tbs(priv, edesc, ts.tv_sec, ts.tv_nsec);
+               }
+
 		stmmac_enable_dma_transmission(priv, priv->ioaddr);
 
 		tx_q->cur_tx = STMMAC_GET_ENTRY(tx_q->cur_tx, priv->dma_tx_size);
Index: linux-5.18.0-rt11/include/uapi/linux/if_xdp.h
===================================================================
--- linux-5.18.0-rt11.orig/include/uapi/linux/if_xdp.h
+++ linux-5.18.0-rt11/include/uapi/linux/if_xdp.h
@@ -104,6 +104,7 @@ struct xdp_desc {
 	__u64 addr;
 	__u32 len;
 	__u32 options;
+        __u64 txtime;
 };
 
 /* UMEM descriptor is __u64 */
Index: linux-5.18.0-rt11/tools/include/uapi/linux/if_xdp.h
===================================================================
--- linux-5.18.0-rt11.orig/tools/include/uapi/linux/if_xdp.h
+++ linux-5.18.0-rt11/tools/include/uapi/linux/if_xdp.h
@@ -104,6 +104,7 @@ struct xdp_desc {
 	__u64 addr;
 	__u32 len;
 	__u32 options;
+        __u64 txtime;
 };
 
 /* UMEM descriptor is __u64 */