summaryrefslogtreecommitdiff
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2014-06-25 06:37:13 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-01-23 05:10:16 +0300
commit074c3582192b6cb340510b2a6e4579e78f671dcf (patch)
tree21542291772546ec5fbc943407a75baa871ad3e7 /drivers/net/virtio_net.c
parent6930895df994af212985396f1274712aaaa5bc26 (diff)
downloadlinux-074c3582192b6cb340510b2a6e4579e78f671dcf.tar.xz
virtio_net: add software timestamp support
This patch enables the use of software timestamping via the virtio_net driver. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 11e2e8131359..9bd71d53c5e0 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -925,6 +925,9 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
/* Free up any pending old buffers before queueing new ones. */
free_old_xmit_skbs(sq);
+ /* timestamp packet in software */
+ skb_tx_timestamp(skb);
+
/* Try to transmit */
err = xmit_skb(sq, skb);
@@ -1376,6 +1379,7 @@ static const struct ethtool_ops virtnet_ethtool_ops = {
.get_ringparam = virtnet_get_ringparam,
.set_channels = virtnet_set_channels,
.get_channels = virtnet_get_channels,
+ .get_ts_info = ethtool_op_get_ts_info,
};
#define MIN_MTU 68