Skip to content

Commit

Permalink
virtio_net: add software timestamp support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jacob Keller authored and Jeff Kirsher committed Jan 23, 2015
1 parent 6930895 commit 074c358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 074c358

Please sign in to comment.