polling: Implement direct input support.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 23 Sep 2017 03:19:26 +0000 (11:19 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 24 Sep 2017 04:27:28 +0000 (12:27 +0800)
commit8d0afa8630caf41afad4c41a047d41f2b8f31d47
treead422b633a922150d7a4791c1059581aa2e3a652
parent41ae08629e82bf5408758ede62d84c59649ad7af
polling: Implement direct input support.

When "direct input" is enabled by driver, driver's RX polling handler
will run ethernet/ip/tcp processing directly, which avoids cache-miss
on mbufs themselves.  Currently it is enabled on ix(4) by default.

The normal IP forwarding performance is improved by %12, while the fast
IP forwarding performance is improved by 10%.  13.2Mpps is achieved for
dual side IP forwarding!

1 request/connection HTTP/1.1 performance and avg-latency stay same,
but the latency is further stablized:
1K  5.20ms  -> 4.60ms
8K  6.43ms  -> 5.76ms
16K 16.30ms -> 14.90ms
sbin/ifconfig/ifconfig.c
share/man/man4/ix.4
sys/dev/netif/ix/if_ix.c
sys/dev/netif/ix/if_ix.h
sys/net/if.h
sys/net/if_ethersubr.c
sys/net/if_poll.c