From: Vlad Yasevich <vyasevic@redhat.com>
To: Jason Wang <jasowang@redhat.com>,
davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] macvtap: fix tx_dropped counting error
Date: Mon, 25 Nov 2013 13:29:50 -0500 [thread overview]
Message-ID: <5293971E.7040407@redhat.com> (raw)
In-Reply-To: <1385371144-11071-1-git-send-email-jasowang@redhat.com>
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;
>
next prev parent reply other threads:[~2013-11-25 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-11-28 23:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5293971E.7040407@redhat.com \
--to=vyasevic@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).