Re: use per cpu counters for ipstat

2016-11-10 Thread Mike Belopuhov
On 9 November 2016 at 10:51, Martin Pieuchot wrote: > On 09/11/16(Wed) 14:55, David Gwynne wrote: >> since counters are an array of uint64_t values, this uses an enum >> to list the indexes into such an array. >> >> we still export an ipstat struct to userland (which you can see >> with netstat -s

Re: use per cpu counters for ipstat

2016-11-09 Thread Martin Pieuchot
On 09/11/16(Wed) 14:55, David Gwynne wrote: > since counters are an array of uint64_t values, this uses an enum > to list the indexes into such an array. > > we still export an ipstat struct to userland (which you can see > with netstat -sp ip). the export cheats a bit because we know that > the s

use per cpu counters for ipstat

2016-11-08 Thread David Gwynne
since counters are an array of uint64_t values, this uses an enum to list the indexes into such an array. we still export an ipstat struct to userland (which you can see with netstat -sp ip). the export cheats a bit because we know that the struct is a collection of u_longs, so we just iterate ove