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: <20100302092301.7ca9b368@nehalam>
Date:	Tue, 2 Mar 2010 09:23:01 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev@...r.kernel.org, bridge@...ts.linux-foundation.org,
	David Miller <davem@...emloft.net>
Subject: Re: [Bridge] [PATCH]  bridge: per-cpu packet statistics

On Tue, 02 Mar 2010 10:02:59 +0100
Eric Dumazet <eric.dumazet@...il.com> wrote:

> From: Stephen Hemminger <shemminger@...tta.com>
> 
> Le lundi 01 mars 2010 à 16:16 -0800, Stephen Hemminger a écrit :
> 
> > +	for_each_online_cpu(cpu) {
> > +		const struct br_cpu_netstats *bstats
> > +			= per_cpu_ptr(br->stats, cpu);
> > +
> > +		stats->rx_bytes   += bstats->rx_bytes;
> > +		stats->rx_packets += bstats->rx_packets;
> > +	}
> 
> And last point, we should use for_each_possible_cpu() here
> 
> Here is your patch with all my comments integrated :
> 
> 1) Use txq->{tx_bytes|tx_packets} counter
> 
> 2) alloc_percpu(struct ...) instead of alloc_percpu(sizeof(struct ...))
> 
> 3) free_netdev() in destructor
> 
> 4) for_each_possible_cpu() instead of for_each_online_cpu()
> 
> 5) br_get_stats() use local variables for the sake of concurrent users

No need, bridge has no queue!
--
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