Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd3e22b7 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

macvtap: fix tx_dropped counting error



After commit 8ffab51b
(macvlan: lockless tx path), tx stat counter were converted to percpu stat
structure. So we need use to this also for tx_dropped in macvtap. Otherwise, the
management won't notice the dropping packet in macvtap tx path.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 167f76a8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -744,7 +744,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
	rcu_read_lock();
	rcu_read_lock();
	vlan = rcu_dereference(q->vlan);
	vlan = rcu_dereference(q->vlan);
	if (vlan)
	if (vlan)
		vlan->dev->stats.tx_dropped++;
		this_cpu_inc(vlan->pcpu_stats->tx_dropped);
	rcu_read_unlock();
	rcu_read_unlock();


	return err;
	return err;