sfc: add transmit timestamping support

Add ethtool op to advertise TX timestamping. Insert a
skb_tx_timestamp call in __efx_enqueue_skb.

Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Link: https://patch.msgid.link/20260330063236.247057-1-ibakolla@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Izabela Bakollari 2026-03-30 08:32:35 +02:00 committed by Jakub Kicinski
parent f843687c30
commit 6730f184ab
2 changed files with 4 additions and 0 deletions

View File

@ -231,6 +231,8 @@ static int efx_ethtool_get_ts_info(struct net_device *net_dev,
{
struct efx_nic *efx = efx_netdev_priv(net_dev);
ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
efx_ptp_get_ts_info(efx, ts_info);
return 0;
}

View File

@ -371,6 +371,8 @@ netdev_tx_t __efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb
if (!data_mapped && (efx_tx_map_data(tx_queue, skb, segments)))
goto err;
skb_tx_timestamp(skb);
efx_tx_maybe_stop_queue(tx_queue);
tx_queue->xmit_pending = true;