Add ifpoll, which support hardware TX/RX queues based polling.
The implementation is mainly based on the polling(4) code.
Difference to the polling(4):
- Instead of registering one polling handler for both TX/RX and status,
drivers could register multiple polling handlers for TX/RX polling
handler on different CPU based on its own needs. And drivers could
register one status check handler, which is always polled on CPU0.
- TX could be polled at lower frequency than RX; normally we don't
need high frequency polling for TX, but for RX, we may need relative
higher polling frequency.
- Better serializer integration.
ifnet changes:
- ifnet.if_qpoll is added, which should be implemented by driver which
supports ifpoll.
- IFF_NPOLLING is added to indicate that the driver is using ifpoll.
ifconfig(8):
- Add 'npolling' and '-npolling'; they are used to turn on/off ifpoll
on the specified interface.
Drivers:
- emx(4) is converted to use the ifpoll. Coexistance of ifpoll and
polling(4) in one driver requires extra effort in driver itself;
drop polling(4) support in emx(4) for now.
IFPOLL_ENABLE kernel option is added, which is not enabled by default.