pktgen: Pregenerate 3/4 of the ifq_maxlen should be enough
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 28 Dec 2012 07:11:32 +0000 (15:11 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 28 Dec 2012 07:11:32 +0000 (15:11 +0800)
tools/tools/netrate/pktgen/pktgen.c

index 1c5c0d9..ff37b07 100644 (file)
@@ -355,7 +355,7 @@ pktgen_start(struct pktgen *pktg)
                lwkt_migratecpu(cpuid);
 
        alloc_cnt = ifp->if_snd.ifq_maxlen * 2;
-       keep_cnt = (ifp->if_snd.ifq_maxlen * 7) / 8;
+       keep_cnt = (ifp->if_snd.ifq_maxlen * 3) / 4;
 
        /*
         * Prefault enough mbuf into mbuf objcache