Use hardware timer to simulate interrupt moderation.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 5 Jul 2008 07:29:44 +0000 (07:29 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 5 Jul 2008 07:29:44 +0000 (07:29 +0000)
commit04b9ef8d4bbce2d4fa0e8289000b3ca8d6798078
treef7ace4383d28d2764d56b776d3a426cd55a483a4
parent5dc1e30e15fdec1386791fa343784e6dd4b67f38
Use hardware timer to simulate interrupt moderation.

hw.nfeX.imtimer -> 0  no interrupt moderation at all.
hw.nfeX.imtimer -> -Y hardware timer simulated interrupt moderation,
                      the simultated interrupt moderation timer will
                      be set to Y.
hw.nfeX.imtimer -> Y  hardware timer only interrupt moderation,
                      hardware timer will be set to Y.

Set hw.nfeX.imtimer to -125 (8000Hz) should work on most system.

With heavier interrupt moderation (e.g. hw.nfeX.imtimer to -250), it is
recommended to increase hw.nfe.rx_ring_count tunable to a higher value
(e.g. 512), since the default value (128) is obviously too small.
sys/dev/netif/nfe/if_nfe.c
sys/dev/netif/nfe/if_nfevar.h