Diff for /src/sys/netinet/tcp_subr.c between versions 1.19 and 1.20

version 1.19, 2004/04/05 17:47:01 version 1.20, 2004/04/07 17:01:25
Line 185  SYSCTL_INT(_net_inet_tcp, OID_AUTO, infl Line 185  SYSCTL_INT(_net_inet_tcp, OID_AUTO, infl
 static void     tcp_cleartaocache (void);  static void     tcp_cleartaocache (void);
 static void     tcp_notify (struct inpcb *, int);  static void     tcp_notify (struct inpcb *, int);
   struct tcp_stats tcpstats_ary[MAXCPU];
   #ifdef SMP
   static int
           int cpu, error;
           for (cpu = error = 0; cpu < ncpus; ++cpu) {
                   if ((error = SYSCTL_OUT(req, (void *)&tcpstats_ary[cpu],
                           sizeof(struct tcp_stats))))
                   if ((error = SYSCTL_IN(req, (void *)&tcpstats_ary[cpu],
                           sizeof(struct tcp_stats))))
           return (error);
       0, 0, sysctl_tcpstats, "S,tcp_stats",
           "TCP statistics (struct tcp_stats, netinet/tcp_stats.h)");
   #else /* !SMP */
   SYSCTL_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW,
       &tcpstat , tcp_stats,
           "TCP statistics (struct tcp_stats, netinet/tcp_stats.h)");
 /*  /*
  * Target size of TCP PCB hash tables. Must be a power of two.   * Target size of TCP PCB hash tables. Must be a power of two.
  *   *
Line 280  tcp_init() Line 307  tcp_init()
                 panic("tcp_init");                  panic("tcp_init");
            * Initialize TCP statistics.
            * It is layed out as an array which is has one element for UP,
            * and SMP_MAXCPU elements for SMP.  This allows us to retain
            * the access mechanism from userland for both UP and SMP.
   #ifdef SMP
           for (cpu = 0; cpu < ncpus; ++cpu) {
                   bzero(&tcpstats_ary[cpu], sizeof(struct tcp_stats));
           bzero(&tcpstat, sizeof(struct tcp_stats));
         syncache_init();          syncache_init();
         tcp_thread_init();          tcp_thread_init();
 }  }

Removed from v.1.19  
changed lines
  Added in v.1.20