netisr_direct

Dave Baukus david.baukus at us.fujitsu.com
Thu Mar 8 22:43:36 UTC 2007


What's the word on netisr_direct ?
Do people typically enable this feature ?

net/netisr.c:
static int      netisr_direct = 0;
SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RW,
     &netisr_direct, 0, "enable direct dispatch");
TUNABLE_INT("net.isr.direct", &netisr_direct);


         /*
          * Do direct dispatch only for MPSAFE netisrs (and
          * only when enabled).  Note that when a netisr is
          * marked MPSAFE we permit multiple concurrent instances
          * to run.  We guarantee only the order in which
          * packets are processed for each "dispatch point" in
          * the system (i.e. call to netisr_dispatch or
          * netisr_queue).  This insures ordering of packets
          * from an interface but does not guarantee ordering
          * between multiple places in the system (e.g. IP
          * dispatched from interfaces vs. IP queued from IPSec).
          */
         if (netisr_direct && (ni->ni_flags & NETISR_MPSAFE)) {
                 isrstat.isrs_directed++;
                 /*
                  * NB: We used to drain the queue before handling
                  * the packet but now do not.  Doing so here will
                  * not preserve ordering so instead we fallback to
                  * guaranteeing order only from dispatch points
                  * in the system (see above).
                  */
                 ni->ni_handler(m);

-- 
Dave Baukus
    david.baukus at us.fujitsu.com
    972-479-2491

    Fujitsu Network Communications
          Richardson, Texas
                  USA


More information about the freebsd-net mailing list