From: Jason Wang Date: Mon, 25 Nov 2013 09:19:04 +0000 (+0800) Subject: macvtap: fix tx_dropped counting error X-Git-Tag: v3.13-rc3~28^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd3e22b75c01fe1e075d91504b29019a05d8d373;p=profile%2Fcommon%2Fkernel-common.git macvtap: fix tx_dropped counting error After commit 8ffab51b3dfc54876f145f15b351c41f3f703195 (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 Cc: Vlad Yasevich Cc: Eric Dumazet Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Acked-by: Vlad Yasevich Signed-off-by: David S. Miller --- diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index dc76670..0605da8 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -744,7 +744,7 @@ err: rcu_read_lock(); vlan = rcu_dereference(q->vlan); if (vlan) - vlan->dev->stats.tx_dropped++; + this_cpu_inc(vlan->pcpu_stats->tx_dropped); rcu_read_unlock(); return err;