NETMAP with kevent don't do TX sync w/o next hack:
1. first register event EVFILT_WRITE with EV_DISABLE
2. second, after update tx ring, add event EVFILT_WRITE with EV_DISPATCH
- specify which FreeBSD version you are using
- specify which netmap port are you opening (ixgbe? ixl? em? vale?, ...)
- provide a code snippet that shows the problem
(In reply to Vincenzo Maffione from comment #1)
10.2-STABLE, netmap port ixgbe.
I am don't retest after discovery in 2016.
Code snippet need to re-implement. About example:
EV_SET(kp, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE, 0, 0, &event_info[kidx]);
int nevent = kevent();
In this example kevent() call don't sync TX ring pointers.
Created attachment 201394 [details]
Example netmap program using kqueue to read or write from a netmap port.
As far as I can see, now kqueue/kevent works correctly, and syncs the tail of the TX ring.
See for instance the program in attachment. I tried that on VALE and pipe ports.
Marking in progress as it looks like this bug is not valid anymore.
It looks like I was wrong, the TXSYNC is not being called (I tried with VALE ports and netmap pipe ports).
I'll have a look asap.