Bug 207261 - NETMAP don't do TX sync with kqueue
Summary: NETMAP don't do TX sync with kqueue
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-net mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-16 21:25 UTC by slw
Modified: 2019-01-28 13:47 UTC (History)
4 users (show)

See Also:


Attachments
Example netmap program using kqueue to read or write from a netmap port. (2.51 KB, text/plain)
2019-01-25 14:58 UTC, Vincenzo Maffione
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description slw 2016-02-16 21:25:52 UTC
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
Comment 1 Vincenzo Maffione freebsd_committer 2019-01-10 22:23:51 UTC
Can you:
  - 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
?
Comment 2 slw 2019-01-25 13:20:49 UTC
(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]);
...
while(1) {
...
  int nevent = kevent();
...
}

In this example kevent() call don't sync TX ring pointers.
Comment 3 Vincenzo Maffione freebsd_committer 2019-01-25 14:58:55 UTC
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.
Comment 4 Vincenzo Maffione freebsd_committer 2019-01-25 15:00:09 UTC
Marking in progress as it looks like this bug is not valid anymore.
Comment 5 Vincenzo Maffione freebsd_committer 2019-01-28 13:47:09 UTC
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.