lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5293971E.7040407@redhat.com>
Date:	Mon, 25 Nov 2013 13:29:50 -0500
From:	Vlad Yasevich <vyasevic@...hat.com>
To:	Jason Wang <jasowang@...hat.com>, davem@...emloft.net,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
CC:	"Michael S. Tsirkin" <mst@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] macvtap: fix tx_dropped counting error

On 11/25/2013 04:19 AM, 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 <mst@...hat.com>
> Cc: Vlad Yasevich <vyasevic@...hat.com>

Acked-by: Vlad Yasevich <vyasevic@...hat.com>

-vlad
> Cc: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Jason Wang <jasowang@...hat.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;
> 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ