lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091210151137.GB17851@oksana.dev.rtsoft.ru>
Date:	Thu, 10 Dec 2009 18:11:37 +0300
From:	Anton Vorontsov <avorontsov@...mvista.com>
To:	Sandeep Gopalpet <Sandeep.Kumar@...escale.com>
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [RFC] gianfar: Fix stats support

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@...escale.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@...il.com
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ