* [PATCH net] macvtap: fix tx_dropped counting error
@ 2013-11-25 9:19 Jason Wang
2013-11-25 11:50 ` Michael S. Tsirkin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jason Wang @ 2013-11-25 9:19 UTC (permalink / raw)
To: davem, netdev, linux-kernel
Cc: Jason Wang, Michael S. Tsirkin, Vlad Yasevich, Eric Dumazet
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@redhat.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Wang <jasowang@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] macvtap: fix tx_dropped counting error
2013-11-25 9:19 [PATCH net] macvtap: fix tx_dropped counting error Jason Wang
@ 2013-11-25 11:50 ` Michael S. Tsirkin
2013-11-25 18:29 ` Vlad Yasevich
2013-11-28 23:32 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2013-11-25 11:50 UTC (permalink / raw)
To: Jason Wang; +Cc: davem, netdev, linux-kernel, Vlad Yasevich, Eric Dumazet
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 <mst@redhat.com>
> Cc: Vlad Yasevich <vyasevic@redhat.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] macvtap: fix tx_dropped counting error
2013-11-25 9:19 [PATCH net] macvtap: fix tx_dropped counting error Jason Wang
2013-11-25 11:50 ` Michael S. Tsirkin
@ 2013-11-25 18:29 ` Vlad Yasevich
2013-11-28 23:32 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Vlad Yasevich @ 2013-11-25 18:29 UTC (permalink / raw)
To: Jason Wang, davem, netdev, linux-kernel; +Cc: Michael S. Tsirkin, Eric Dumazet
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@redhat.com>
> Cc: Vlad Yasevich <vyasevic@redhat.com>
Acked-by: Vlad Yasevich <vyasevic@redhat.com>
-vlad
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Wang <jasowang@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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] macvtap: fix tx_dropped counting error
2013-11-25 9:19 [PATCH net] macvtap: fix tx_dropped counting error Jason Wang
2013-11-25 11:50 ` Michael S. Tsirkin
2013-11-25 18:29 ` Vlad Yasevich
@ 2013-11-28 23:32 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-11-28 23:32 UTC (permalink / raw)
To: jasowang; +Cc: netdev, linux-kernel, mst, vyasevic, edumazet
From: Jason Wang <jasowang@redhat.com>
Date: Mon, 25 Nov 2013 17:19:04 +0800
> 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@redhat.com>
> Cc: Vlad Yasevich <vyasevic@redhat.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Applied, thanks Jason.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-28 23:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 9:19 [PATCH net] macvtap: fix tx_dropped counting error Jason Wang
2013-11-25 11:50 ` Michael S. Tsirkin
2013-11-25 18:29 ` Vlad Yasevich
2013-11-28 23:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).