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: <1308545992.3539.114.camel@edumazet-laptop>
Date:	Mon, 20 Jun 2011 06:59:52 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, Stephen Hemminger <shemminger@...tta.com>,
	netdev@...r.kernel.org, gospo@...hat.com
Subject: Re: [net-next 04/17] ixgbevf: provide 64 bit statistics

Le dimanche 19 juin 2011 à 17:58 -0700, Jeff Kirsher a écrit :
> From: Stephen Hemminger <shemminger@...tta.com>
> 
> Compute statistics per ring using 64 bits, and provide
> network device stats in 64 bits.
> 
> Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> Acked-by: Greg Rose <Gregory.v.rose@...el.com>
> Tested-by: Evan Swanson <evan.swanson@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---

>  
> +static struct rtnl_link_stats64 *ixgbevf_get_stats(struct net_device *netdev,
> +						   struct rtnl_link_stats64 *stats)
> +{
> +	struct ixgbevf_adapter *adapter = netdev_priv(netdev);
> +	int i;
> +
> +	ixgbevf_update_stats(adapter);
> +
> +	stats->multicast = adapter->stats.vfmprc - adapter->stats.base_vfmprc;
> +
> +	for (i = 0; i < adapter->num_rx_queues; i++) {
> +		stats->rx_bytes += adapter->rx_ring[i].total_bytes;
> +		stats->rx_packets += adapter->rx_ring[i].total_packets;
> +	}
> +
> +	for (i = 0; i < adapter->num_tx_queues; i++) {
> +		stats->tx_bytes += adapter->tx_ring[i].total_bytes;
> +		stats->tx_packets += adapter->tx_ring[i].total_packets;
> +	}
> +
> +	return stats;
> +}
> +

Unfortunately this patch is racy on 32bit arches.

Jeff, maybe you missed all the discussion we had lately on these
conversions, needing appropriate synchronization ?

It seems a lot of bugs were added lately with Stephen patches, this is
rather unfortunate...

I guess I'll have to review them and send fixes.


--
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