On Thu, Jun 28, 2012 at 07:00:54AM +0200, Eric Dumazet wrote: > [1] : LLTX drivers case > since ndo_start_xmit() can be run concurrently by many cpus, safely > updating an "unsigned long" requires additional hassle : > > 1) Use of a spinlock to protect the update. > 2) Use atomic_long_t instead of "unsigned long" > 3) Use percpu data > > 3) is overkill for devices with light traffic, because it consumes lot > of RAM on machines with 2048 possible cpus, _and_ the reader must fold > the data of all possible values. Thanks Eric. So am I right in thinking that a v3 patch which uses atomic_long_t for the statistics would be the correct way forwards? -- Tom Parkin Katalix Systems Ltd http://www.katalix.com Catalysts for your Embedded Linux software development