From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: David Vrabel <david.vrabel@citrix.com>, netdev@vger.kernel.org
Cc: xen-devel@lists.xenproject.org,
Ian Campbell <ian.campbell@citrix.com>,
Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCHv1 1/2] xen-netback: return correct ethtool stats
Date: Wed, 04 Mar 2015 15:50:48 +0300 [thread overview]
Message-ID: <54F6FFA8.70505@cogentembedded.com> (raw)
In-Reply-To: <1425399971-27630-2-git-send-email-david.vrabel@citrix.com>
Hello.
On 3/3/2015 7:26 PM, David Vrabel wrote:
> Use correct pointer arithmetic to get the pointer to each stat.
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> ---
> drivers/net/xen-netback/interface.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index f38227a..3aa8648 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -340,12 +340,11 @@ static void xenvif_get_ethtool_stats(struct net_device *dev,
> unsigned int num_queues = vif->num_queues;
> int i;
> unsigned int queue_index;
> - struct xenvif_stats *vif_stats;
>
> for (i = 0; i < ARRAY_SIZE(xenvif_stats); i++) {
> unsigned long accum = 0;
> for (queue_index = 0; queue_index < num_queues; ++queue_index) {
> - vif_stats = &vif->queues[queue_index].stats;
> + void *vif_stats = &vif->queues[queue_index].stats;
Need empty line after declaration; checkpatch.pl should have complained here.
> accum += *(unsigned long *)(vif_stats + xenvif_stats[i].offset);
> }
> data[i] = accum;
WBR, Sergei
next prev parent reply other threads:[~2015-03-04 12:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 16:26 [PATCHv1 0/2 net] xen-netback: fix ethtool stats and memory David Vrabel
2015-03-03 16:26 ` [PATCHv1 1/2] xen-netback: return correct ethtool stats David Vrabel
2015-03-04 12:50 ` Sergei Shtylyov [this message]
2015-03-03 16:26 ` [PATCHv1 2/2] xen-netback: unref frags when handling a from-guest skb with a frag list David Vrabel
2015-03-03 16:56 ` [Xen-devel] " Zoltan Kiss
2015-03-04 9:48 ` Ian Campbell
2015-03-04 9:56 ` [Xen-devel] " David Vrabel
2015-03-04 10:02 ` Ian Campbell
2015-03-04 5:22 ` [PATCHv1 0/2 net] xen-netback: fix ethtool stats and memory 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=54F6FFA8.70505@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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).