summaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_kloop.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r343689Vincenzo Maffione2019-02-071-98/+309
| | | | | | | | | | netmap: upgrade sync-kloop support Add SYNC_KLOOP_MODE option, and add support for direct mode, where application executes the TXSYNC and RXSYNC in the context of the ioeventfd wake up callback. Notes: svn path=/stable/11/; revision=343866
* MFC r343549Vincenzo Maffione2019-02-061-9/+24
| | | | | | | | | | | netmap: add notifications on kloop stop On sync-kloop stop, send a wake-up signal to the kloop, so that waiting for the timeout is not needed. Also, improve logging in netmap_freebsd.c. Notes: svn path=/stable/11/; revision=343834
* MFC r343346Vincenzo Maffione2019-02-061-51/+95
| | | | | | | | | | | | | | | | | | | | | | netmap: improvements to the netmap kloop (CSB mode) Changelist: - Add the proper memory barriers in the kloop ring processing functions. - Fix memory barriers usage in the user helpers (nm_sync_kloop_appl_write, nm_sync_kloop_appl_read). - Fix nm_kr_txempty() helper to look at rhead rather than rcur. This is important since the kloop can read a value of rcur which is ahead of the value of rhead (see explanation in nm_sync_kloop_appl_write) - Remove obsolete ptnetmap_guest_write_kring_csb() and ptnet_guest_read_kring_csb(). - Prepare in advance the arguments for netmap_sync_kloop_[tr]x_ring(), to make the kloop faster. - Provide kernel and user implementation for nm_ldld_barrier() and nm_ldst_barrier() Notes: svn path=/stable/11/; revision=343832
* MFC r341992Vincenzo Maffione2018-12-151-0/+2
| | | | | | | | | netmap: fix warning in netmap_kloop.c Reported by: markj Notes: svn path=/stable/11/; revision=342131
* MFC r341516, r341589Vincenzo Maffione2018-12-131-0/+916
netmap: align codebase to the current upstream (760279cfb2730a585) Changelist: - Replace netmap passthrough host support with a more general mechanism to call TXSYNC/RXSYNC from an in-kernel event-loop. No kernel threads are used to use this feature: the application is required to spawn a thread (or a process) and issue a SYNC_KLOOP_START (NIOCCTRL) command in the thread body. The kernel loop is executed by the ioctl implementation, which returns to userspace only when a different thread calls SYNC_KLOOP_STOP or the netmap file descriptor is closed. - Update the if_ptnet driver to cope with the new data structures, and prune all the obsolete ptnetmap code. - Add support for "null" netmap ports, useful to allocate netmap_if, netmap_ring and netmap buffers to be used by specialized applications (e.g. hypervisors). TXSYNC/RXSYNC on these ports have no effect. - Various fixes and code refactoring. Sponsored by: Sunny Valley Networks Differential Revision: https://reviews.freebsd.org/D18015 Notes: svn path=/stable/11/; revision=342033