diff options
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9fbdfcd1e1a0..ee384f3d612b 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -1569,6 +1569,14 @@ static int virtnet_probe(struct virtio_device *vdev) | |||
1569 | if (vi->stats == NULL) | 1569 | if (vi->stats == NULL) |
1570 | goto free; | 1570 | goto free; |
1571 | 1571 | ||
1572 | for_each_possible_cpu(i) { | ||
1573 | struct virtnet_stats *virtnet_stats; | ||
1574 | virtnet_stats = per_cpu_ptr(vi->stats, i); | ||
1575 | u64_stats_init(&virtnet_stats->tx_syncp); | ||
1576 | u64_stats_init(&virtnet_stats->rx_syncp); | ||
1577 | } | ||
1578 | |||
1579 | |||
1572 | vi->vq_index = alloc_percpu(int); | 1580 | vi->vq_index = alloc_percpu(int); |
1573 | if (vi->vq_index == NULL) | 1581 | if (vi->vq_index == NULL) |
1574 | goto free_stats; | 1582 | goto free_stats; |