summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback
diff options
context:
space:
mode:
authorLuca Fancellu <luca.fancellu@arm.com>2023-10-10 16:26:30 +0200
committerDavid S. Miller <davem@davemloft.net>2023-10-13 11:19:50 +0200
commit0b38d2ec2282f39ecb82b6cdc9af42f817e77551 (patch)
treef1e4514ec9abb56c03cd52d3d59d27412f972542 /drivers/net/xen-netback
parentibmvnic: replace deprecated strncpy with strscpy (diff)
downloadlinux-0b38d2ec2282f39ecb82b6cdc9af42f817e77551.tar.xz
linux-0b38d2ec2282f39ecb82b6cdc9af42f817e77551.zip
xen-netback: add software timestamp capabilities
Add software timestamp capabilities to the xen-netback driver by advertising it on the struct ethtool_ops and calling skb_tx_timestamp before passing the buffer to the queue. Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r--drivers/net/xen-netback/interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index fc3bb63b9ac3..db304f178136 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -252,6 +252,9 @@ xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)
skb_clear_hash(skb);
+ /* timestamp packet in software */
+ skb_tx_timestamp(skb);
+
if (!xenvif_rx_queue_tail(queue, skb))
goto drop;
@@ -458,7 +461,7 @@ static void xenvif_get_strings(struct net_device *dev, u32 stringset, u8 * data)
static const struct ethtool_ops xenvif_ethtool_ops = {
.get_link = ethtool_op_get_link,
-
+ .get_ts_info = ethtool_op_get_ts_info,
.get_sset_count = xenvif_get_sset_count,
.get_ethtool_stats = xenvif_get_ethtool_stats,
.get_strings = xenvif_get_strings,