From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Vlad Yasevich <vyasevic@redhat.com>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] macvtap: fix tx_dropped counting error
Date: Mon, 25 Nov 2013 13:50:05 +0200 [thread overview]
Message-ID: <20131125115005.GA32173@redhat.com> (raw)
In-Reply-To: <1385371144-11071-1-git-send-email-jasowang@redhat.com>
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
next prev parent reply other threads:[~2013-11-25 11:46 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 [this message]
2013-11-25 18:29 ` Vlad Yasevich
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=20131125115005.GA32173@redhat.com \
--to=mst@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vyasevic@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.