[BACK]Return to ip_input.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/ip_input.c between version 1.268.2.3 and 1.284.4.1

version 1.268.2.3, 2009/07/18 14:53:25 version 1.284.4.1, 2010/05/30 05:18:02
Line 231  u_long in_multihash;    /* size of hash 
Line 231  u_long in_multihash;    /* size of hash 
 int     in_multientries;                        /* total number of addrs */  int     in_multientries;                        /* total number of addrs */
 struct  in_multihashhead *in_multihashtbl;  struct  in_multihashhead *in_multihashtbl;
 struct  ifqueue ipintrq;  struct  ifqueue ipintrq;
   
 uint16_t ip_id;  uint16_t ip_id;
   
 percpu_t *ipstat_percpu;  percpu_t *ipstat_percpu;
Line 383  struct mowner ip_rx_mowner = MOWNER_INIT
Line 384  struct mowner ip_rx_mowner = MOWNER_INIT
 struct mowner ip_tx_mowner = MOWNER_INIT("internet", "tx");  struct mowner ip_tx_mowner = MOWNER_INIT("internet", "tx");
 #endif  #endif
   
   static void sysctl_net_inet_ip_setup(struct sysctllog **);
   
 /*  /*
  * Compute IP limits derived from the value of nmbclusters.   * Compute IP limits derived from the value of nmbclusters.
  */   */
Line 403  ip_init(void)
Line 406  ip_init(void)
         const struct protosw *pr;          const struct protosw *pr;
         int i;          int i;
   
           sysctl_net_inet_ip_setup(NULL);
   
         pool_init(&inmulti_pool, sizeof(struct in_multi), 0, 0, 0, "inmltpl",          pool_init(&inmulti_pool, sizeof(struct in_multi), 0, 0, 0, "inmltpl",
             NULL, IPL_SOFTNET);              NULL, IPL_SOFTNET);
         pool_init(&ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl",          pool_init(&ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl",
Line 470  ipintr(void)
Line 475  ipintr(void)
 {  {
         int s;          int s;
         struct mbuf *m;          struct mbuf *m;
           struct ifqueue lcl_intrq;
   
           memset(&lcl_intrq, 0, sizeof(lcl_intrq));
           ipintrq.ifq_maxlen = ipqmaxlen;
   
         mutex_enter(softnet_lock);          mutex_enter(softnet_lock);
         KERNEL_LOCK(1, NULL);          KERNEL_LOCK(1, NULL);
         while (!IF_IS_EMPTY(&ipintrq)) {          if (!IF_IS_EMPTY(&ipintrq)) {
                 s = splnet();                  s = splnet();
                 IF_DEQUEUE(&ipintrq, m);  
                   /* Take existing queue onto stack */
                   lcl_intrq = ipintrq;
   
                   /* Zero out global queue, preserving maxlen and drops */
                   ipintrq.ifq_head = NULL;
                   ipintrq.ifq_tail = NULL;
                   ipintrq.ifq_len = 0;
                   ipintrq.ifq_maxlen = lcl_intrq.ifq_maxlen;
                   ipintrq.ifq_drops = lcl_intrq.ifq_drops;
   
                 splx(s);                  splx(s);
           }
           KERNEL_UNLOCK_ONE(NULL);
           while (!IF_IS_EMPTY(&lcl_intrq)) {
                   IF_DEQUEUE(&lcl_intrq, m);
                 if (m == NULL)                  if (m == NULL)
                         break;                          break;
                 ip_input(m);                  ip_input(m);
         }          }
         KERNEL_UNLOCK_ONE(NULL);  
         mutex_exit(softnet_lock);          mutex_exit(softnet_lock);
 }  }
   
Line 2057  ip_savecontrol(struct inpcb *inp, struct
Line 2079  ip_savecontrol(struct inpcb *inp, struct
     struct mbuf *m)      struct mbuf *m)
 {  {
   
         if (inp->inp_socket->so_options & SO_TIMESTAMP          if (inp->inp_socket->so_options & SO_TIMESTAMP
 #ifdef SO_OTIMESTAMP  #ifdef SO_OTIMESTAMP
             || inp->inp_socket->so_options & SO_OTIMESTAMP              || inp->inp_socket->so_options & SO_OTIMESTAMP
 #endif  #endif
             ) {              ) {
                 struct timeval tv;                  struct timeval tv;
Line 2207  sysctl_net_inet_ip_maxflows(SYSCTLFN_ARG
Line 2229  sysctl_net_inet_ip_maxflows(SYSCTLFN_ARG
   
 static int  static int
 sysctl_net_inet_ip_hashsize(SYSCTLFN_ARGS)  sysctl_net_inet_ip_hashsize(SYSCTLFN_ARGS)
 {  {
         int error, tmp;          int error, tmp;
         struct sysctlnode node;          struct sysctlnode node;
   
Line 2235  sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG
Line 2257  sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG
                  * EINVAL if not a power of 2                   * EINVAL if not a power of 2
                  */                   */
                 error = EINVAL;                  error = EINVAL;
         }          }
   
         return error;          return error;
 }  }
Line 2248  sysctl_net_inet_ip_stats(SYSCTLFN_ARGS)
Line 2270  sysctl_net_inet_ip_stats(SYSCTLFN_ARGS)
         return (NETSTAT_SYSCTL(ipstat_percpu, IP_NSTATS));          return (NETSTAT_SYSCTL(ipstat_percpu, IP_NSTATS));
 }  }
   
 SYSCTL_SETUP(sysctl_net_inet_ip_setup, "sysctl net.inet.ip subtree setup")  static void
   sysctl_net_inet_ip_setup(struct sysctllog **clog)
 {  {
         extern int subnetsarelocal, hostzeroisbroadcast;          extern int subnetsarelocal, hostzeroisbroadcast;
   

Legend:
Removed from v.1.268.2.3  
changed lines
  Added in v.1.284.4.1

CVSweb <webmaster@jp.NetBSD.org>