All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [RFC] gianfar: Fix stats support
Date: Thu, 10 Dec 2009 18:11:37 +0300	[thread overview]
Message-ID: <20091210151137.GB17851@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1260423764-21210-1-git-send-email-Sandeep.Kumar@freescale.com>

On Thu, Dec 10, 2009 at 11:12:44AM +0530, Sandeep Gopalpet wrote:
> This patch updates the per rx/tx queue stats.
> To update the per rx queue stats a new structure has been
> introduced rx_q_stats.
> The per tx queue stats are updated via the netdev_queue
> structure itself.
> 
> Note that we update only the tx_packtes, tx_bytes, rx_packets,
> rx_bytes and rx_dropped stats on a per queue basis.
> 
> Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
> ---
[...]
> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
> index 73ccb07..7e6f4e4 100644
> --- a/drivers/net/gianfar.c
> +++ b/drivers/net/gianfar.c
> @@ -143,6 +143,7 @@ void gfar_start(struct net_device *dev);
>  static void gfar_clear_exact_match(struct net_device *dev);
>  static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
>  static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
> +static struct net_device_stats *gfar_get_stats(struct net_device *dev);

Just a cosmetic nitpick: please avoid adding new forward
declarations.

In this case I think you could easily move this function before
gfar_netdev_ops.

>  u16 gfar_select_queue(struct net_device *dev, struct sk_buff *skb);
>  
>  MODULE_AUTHOR("Freescale Semiconductor, Inc");
> @@ -426,6 +427,7 @@ static const struct net_device_ops gfar_netdev_ops = {
>  	.ndo_tx_timeout = gfar_timeout,
>  	.ndo_do_ioctl = gfar_ioctl,
>  	.ndo_select_queue = gfar_select_queue,
> +	.ndo_get_stats = gfar_get_stats,
[...]
> +static struct net_device_stats *gfar_get_stats(struct net_device *dev)
> +{
> +	struct gfar_private *priv = netdev_priv(dev);

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

  parent reply	other threads:[~2009-12-10 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-10  5:42 [RFC] gianfar: Fix stats support Sandeep Gopalpet
2009-12-10  6:13 ` Eric Dumazet
2009-12-10  7:43   ` Kumar Gopalpet-B05799
2009-12-10  8:21     ` Eric Dumazet
2009-12-10  8:25 ` Eric Dumazet
2009-12-10 15:11 ` Anton Vorontsov [this message]
2009-12-11  4:50   ` Kumar Gopalpet-B05799

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=20091210151137.GB17851@oksana.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=Sandeep.Kumar@freescale.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.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 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.