Make IP statistics counters per-CPU so they can be updated safely.
authorHiten Pandya <hmp@dragonflybsd.org>
Mon, 3 May 2004 15:18:25 +0000 (15:18 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Mon, 3 May 2004 15:18:25 +0000 (15:18 +0000)
commitfc9c7b4f3a2b286f7e743559d6fb4c2d87040bb3
tree9ebed45a895231e2b4f70e9a964c408e84ced456
parent9c2a2ceebc25e27805329e152ef26ea83b875dca
Make IP statistics counters per-CPU so they can be updated safely.

* For SMP, we index into the array with the current CPU's
  as ipstats_ary[gd->gd_cpuid], and for UP we just return
  struct at ipstats_ary[0] (CPU-0).

* Rename the structure from ipstat to ip_stats.

* Wrap function definition of CPU counter aggregation in a
  macro called CPU_STATS_FUNC() to avoid duplication.

* Retain support for resetting the counters using netstat(1).
sys/netinet/ip_flow.c
sys/netinet/ip_input.c
sys/netinet/ip_var.h
usr.bin/netstat/inet.c
usr.bin/systat/ip.c