From: Jacob Keller Date: Wed, 25 Jun 2014 02:37:13 +0000 (+0000) Subject: virtio_net: add software timestamp support X-Git-Tag: v5.15~16375^2~154^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=074c3582192b6cb340510b2a6e4579e78f671dcf;p=platform%2Fkernel%2Flinux-starfive.git virtio_net: add software timestamp support This patch enables the use of software timestamping via the virtio_net driver. Signed-off-by: Jacob Keller Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 11e2e81..9bd71d5 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