[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.284 and 1.284.2.1

version 1.284, 2009/09/16 15:23:05 version 1.284.2.1, 2010/04/30 14:44:21
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 474  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);
 }  }
   

Legend:
Removed from v.1.284  
changed lines
  Added in v.1.284.2.1

CVSweb <webmaster@jp.NetBSD.org>