On Mon, Nov 25, 2013 at 05:19:04PM +0800, Jason Wang wrote:
> 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 <m...@redhat.com>
> Cc: Vlad Yasevich <vyase...@redhat.com>
> Cc: Eric Dumazet <eduma...@google.com>
> Signed-off-by: Jason Wang <jasow...@redhat.com>


Acked-by: Michael S. Tsirkin <m...@redhat.com>

> ---
>  drivers/net/macvtap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> -- 
> 1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to