|
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
| #
e4c81e46 |
| 24-Jan-2021 |
Vincenzo Maffione <[email protected]> |
netmap: simplify parameter passing
Changes imported from the netmap github.
(cherry picked from commit ee0005f11f2b38a714bc66b7d79832108f6fee77)
|
|
Revision tags: release/12.2.0, release/11.4.0 |
|
| #
66823237 |
| 11-Jun-2020 |
Vincenzo Maffione <[email protected]> |
netmap: introduce netmap_kring_on()
This function returns NULL if the ring identified by queue id and direction is in netmap mode. Otherwise return the corresponding kring. Use this function to repl
netmap: introduce netmap_kring_on()
This function returns NULL if the ring identified by queue id and direction is in netmap mode. Otherwise return the corresponding kring. Use this function to replace vtnet_netmap_queue_on().
MFC after: 1 week
show more ...
|
| #
723180da |
| 07-Feb-2020 |
Vincenzo Maffione <[email protected]> |
netmap: improve netmap(4) and vale(4) man pages
Clean up obsolete sysctl descriptions and add missing ones.
PR: 243838 Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.fre
netmap: improve netmap(4) and vale(4) man pages
Clean up obsolete sysctl descriptions and add missing ones.
PR: 243838 Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23546
show more ...
|
| #
2ec213ab |
| 13-Jan-2020 |
Vincenzo Maffione <[email protected]> |
netmap: disable passthrough with no hypervisor support
The netmap passthrough subsystem requires proper support in the hypervisor. In particular, two PCI device ids (from the Red Hat PCI vendor id 0
netmap: disable passthrough with no hypervisor support
The netmap passthrough subsystem requires proper support in the hypervisor. In particular, two PCI device ids (from the Red Hat PCI vendor id 0x1b36) need to be assigned to the two netmap virtual devices. We then disable these devices until the ids have not been assigned, in order to avoid conflicts with other virtual devices emulated by upstream QEMU.
PR: 241774 MFC after: 3 days
show more ...
|
|
Revision tags: release/12.1.0 |
|
| #
253b2ec1 |
| 01-Sep-2019 |
Vincenzo Maffione <[email protected]> |
netmap: import changes from upstream (SHA 137f537eae513)
- Rework option processing. - Use larger integers for memory size values in the memory management code.
MFC after: 2 weeks
|
|
Revision tags: release/11.3.0 |
|
| #
45100257 |
| 18-Feb-2019 |
Vincenzo Maffione <[email protected]> |
netmap: don't schedule kqueue notify task when kqueue is not used
This change adds a counter (kqueue_users) to keep track of how many kqueue users are referencing a given struct nm_selinfo. In this
netmap: don't schedule kqueue notify task when kqueue is not used
This change adds a counter (kqueue_users) to keep track of how many kqueue users are referencing a given struct nm_selinfo. In this way, nm_os_selwakeup() can schedule the kevent notification task only when kqueue is actually being used. This is important to avoid wasting CPU in the common case where kqueue is not used.
Reviewed by: Aleksandr Fedorov <[email protected]> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D19177
show more ...
|
| #
75f4f3ed |
| 05-Feb-2019 |
Vincenzo Maffione <[email protected]> |
netmap: refactor logging macros and pipes
Changelist: - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr and nm_prlim, to avoid possible naming conflicts. - Add netmap_kri
netmap: refactor logging macros and pipes
Changelist: - Replace ND, D and RD macros with nm_prdis, nm_prinf, nm_prerr and nm_prlim, to avoid possible naming conflicts. - Add netmap_krings_mode_commit() helper function and use that to reduce code duplication. - Refactor pipes control code to export some functions that can be reused by the veth driver (on Linux) and epair(4). - Add check to reject API requests with version less than 11. - Small code refactoring for the null adapter.
MFC after: 1 week
show more ...
|
| #
5faab778 |
| 02-Feb-2019 |
Vincenzo Maffione <[email protected]> |
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.
MF
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.
MFC after: 5 days
show more ...
|
| #
19c4ec08 |
| 30-Jan-2019 |
Vincenzo Maffione <[email protected]> |
netmap: fix lock order reversal related to kqueue usage
When using poll(), select() or kevent() on netmap file descriptors, netmap executes the equivalent of NIOCTXSYNC and NIOCRXSYNC commands, befo
netmap: fix lock order reversal related to kqueue usage
When using poll(), select() or kevent() on netmap file descriptors, netmap executes the equivalent of NIOCTXSYNC and NIOCRXSYNC commands, before collecting the events that are ready. In other words, the poll/kevent callback has side effects. This is done to avoid the overhead of two system call per iteration (e.g., poll() + ioctl(NIOC*XSYNC)).
When the kqueue subsystem invokes the kqueue(9) f_event callback (netmap_knrw), it holds the lock of the struct knlist object associated to the netmap port (the lock is provided at initialization, by calling knlist_init_mtx). However, netmap_knrw() may need to wake up another netmap port (or even the same one), which means that it may need to call knote(). Since knote() needs the lock of the struct knlist object associated to the to-be-wake-up netmap port, it is possible to have a lock order reversal problem (AB/BA deadlock).
This change prevents the deadlock by executing the knote() call in a per-selinfo taskqueue, where it is possible to hold a mutex.
Reviewed by: aleksandr.fedorov_itglobal.com MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18956
show more ...
|
| #
f79ba6d7 |
| 23-Jan-2019 |
Vincenzo Maffione <[email protected]> |
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
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(), and update if_ptnet(4) to use those. - 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()
MFC after: 2 weeks
show more ...
|
| #
8c9874f5 |
| 23-Jan-2019 |
Vincenzo Maffione <[email protected]> |
netmap: fix knote() argument to match the mutex state
The nm_os_selwakeup function needs to call knote() to wake up kqueue(9) users. However, this function can be called from different code paths, w
netmap: fix knote() argument to match the mutex state
The nm_os_selwakeup function needs to call knote() to wake up kqueue(9) users. However, this function can be called from different code paths, with different lock requirements. This patch fixes the knote() call argument to match the relavant lock state. Also, comments have been updated to reflect current code.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219846 Reported by: Aleksandr Fedorov <[email protected]> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18876
show more ...
|
| #
77a2baf5 |
| 21-Dec-2018 |
Vincenzo Maffione <[email protected]> |
netmap: move buf_size validation code to its own function
This code validates the netmap buf_size against the interface MTU and maximum descriptor size, to make sure the values are consistent. Movin
netmap: move buf_size validation code to its own function
This code validates the netmap buf_size against the interface MTU and maximum descriptor size, to make sure the values are consistent. Moving this functionality to its own function is needed because this function is also called by Linux-specific code.
MFC after: 3 days
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
b6e66be2 |
| 05-Dec-2018 |
Vincenzo Maffione <[email protected]> |
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 e
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
show more ...
|
| #
2a7db7a6 |
| 23-Oct-2018 |
Vincenzo Maffione <[email protected]> |
netmap: align codebase to the current upstream (sha 8374e1a7e6941)
Changelist: - Move large parts of VALE code to a new file and header netmap_bdg.[ch]. This is useful to reuse the code wi
netmap: align codebase to the current upstream (sha 8374e1a7e6941)
Changelist: - Move large parts of VALE code to a new file and header netmap_bdg.[ch]. This is useful to reuse the code within upcoming projects. - Improvements and bug fixes to pipes and monitors. - Introduce nm_os_onattach(), nm_os_onenter() and nm_os_onexit() to handle differences between FreeBSD and Linux. - Introduce some new helper functions to handle more host rings and fake rings (netmap_all_rings(), netmap_real_rings(), ...) - Added new sysctl to enable/disable hw checksum in emulated netmap mode. - nm_inject: add support for NS_MOREFRAG
Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D17364
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
cfa866f6 |
| 18-May-2018 |
Matt Macy <[email protected]> |
netmap: pull fix for 32-bit support from upstream
Approved by: sbruno
|
| #
2ff91c17 |
| 12-Apr-2018 |
Vincenzo Maffione <[email protected]> |
netmap: align codebase to the current upstream (commit id 3fb001303718146)
Changelist: - Turn tx_rings and rx_rings arrays into arrays of pointers to kring structs. This patch includes fix
netmap: align codebase to the current upstream (commit id 3fb001303718146)
Changelist: - Turn tx_rings and rx_rings arrays into arrays of pointers to kring structs. This patch includes fixes for ixv, ixl, ix, re, cxgbe, iflib, vtnet and ptnet drivers to cope with the change. - Generalize the nm_config() callback to accept a struct containing many parameters. - Introduce NKR_FAKERING to support buffers sharing (used for netmap pipes) - Improved API for external VALE modules. - Various bug fixes and improvements to the netmap memory allocator, including support for externally (userspace) allocated memory. - Refactoring of netmap pipes: now linked rings share the same netmap buffers, with a separate set of kring pointers (rhead, rcur, rtail). Buffer swapping does not need to happen anymore. - Large refactoring of the control API towards an extensible solution; the goal is to allow the addition of more commands and extension of existing ones (with new options) without the need of hacks or the risk of running out of configuration space. A new NIOCCTRL ioctl has been added to handle all the requests of the new control API, which cover all the functionalities so far supported. The netmap API bumps from 11 to 12 with this patch. Full backward compatibility is provided for the old control command (NIOCREGIF), by means of a new netmap_legacy module. Many parts of the old netmap.h header has now been moved to netmap_legacy.h (included by netmap.h).
Approved by: hrs (mentor)
show more ...
|
| #
4f80b14c |
| 09-Apr-2018 |
Vincenzo Maffione <[email protected]> |
netmap: align codebase to upstream version v11.4
Changelist: - remove unused nkr_slot_flags - new nm_intr adapter callback to enable/disable interrupts - remove unused sysctls and document the
netmap: align codebase to upstream version v11.4
Changelist: - remove unused nkr_slot_flags - new nm_intr adapter callback to enable/disable interrupts - remove unused sysctls and document the other sysctls - new infrastructure to support NS_MOREFRAG for NIC ports - support for external memory allocator (for now linux-only), including linux-specific changes in common headers - optimizations within netmap pipes datapath - improvements on VALE control API - new nm_parse() helper function in netmap_user.h - various bug fixes and code clean up
Approved by: hrs (mentor)
show more ...
|
| #
46023447 |
| 04-Apr-2018 |
Vincenzo Maffione <[email protected]> |
netmap: align if_ptnet guest driver to the upstream code (commit 0e15788)
The change upgrades the driver to use the split Communication Status Block (CSB) format. In this way the variables written b
netmap: align if_ptnet guest driver to the upstream code (commit 0e15788)
The change upgrades the driver to use the split Communication Status Block (CSB) format. In this way the variables written by the guest and read by the host are allocated in a different cacheline than the variables written by the host and read by the guest; this is needed to avoid cache thrashing.
Approved by: hrs (mentor)
show more ...
|
| #
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
c3e9b4db |
| 12-Jun-2017 |
Luiz Otavio O Souza <[email protected]> |
Update the current version of netmap to bring it in sync with the github version.
This commit contains mostly refactoring, a few fixes and minor added functionality.
Submitted by: Vincenzo Maffione
Update the current version of netmap to bring it in sync with the github version.
This commit contains mostly refactoring, a few fixes and minor added functionality.
Submitted by: Vincenzo Maffione <v.maffione at gmail.com> Requested by: many Sponsored by: Rubicon Communications, LLC (Netgate)
show more ...
|
| #
844a6f0c |
| 27-Oct-2016 |
Luigi Rizzo <[email protected]> |
Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: - use PCI_VENDOR and PCI_DEVICE ids from a publicly allocated range (thanks to RedHat) - export memory pool information th
Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: - use PCI_VENDOR and PCI_DEVICE ids from a publicly allocated range (thanks to RedHat) - export memory pool information through PCI registers - improve mechanism for configuring passthrough on different hypervisors Code is from Vincenzo Maffione as a follow up to his GSOC work.
show more ...
|
| #
a2a74091 |
| 18-Oct-2016 |
Luigi Rizzo <[email protected]> |
remove stale and unused code from various files fix build on 32 bit platforms simplify logic in netmap_virt.h
The commands (in net/netmap.h) to configure communication with the hypervisor may be rev
remove stale and unused code from various files fix build on 32 bit platforms simplify logic in netmap_virt.h
The commands (in net/netmap.h) to configure communication with the hypervisor may be revised soon. At the moment they are unused so this will not be a change of API.
show more ...
|
| #
225d33ff |
| 18-Oct-2016 |
Sean Bruno <[email protected]> |
Restore svn r306772 that was overwritten by netmap import at svn r307394
#include <sys/selinfo.h> should be here as all drivers that support netmap need to use this file regardless.
|
| #
37e3a6d3 |
| 16-Oct-2016 |
Luigi Rizzo <[email protected]> |
Import the current version of netmap, aligned with the one on github.
This commit, long overdue, contains contributions in the last 2 years from Stefano Garzarella, Giuseppe Lettieri, Vincenzo Maffi
Import the current version of netmap, aligned with the one on github.
This commit, long overdue, contains contributions in the last 2 years from Stefano Garzarella, Giuseppe Lettieri, Vincenzo Maffione, including: + fixes on monitor ports + the 'ptnet' virtual device driver, and ptnetmap backend, for high speed virtual passthrough on VMs (bhyve fixes in an upcoming commit) + improved emulated netmap mode + more robust error handling + removal of stale code + various fixes to code and documentation (some mixup between RX and TX parameters, and private and public variables)
We also include an additional tool, nmreplay, which is functionally equivalent to tcpreplay but operating on netmap ports.
show more ...
|
| #
87de0cd1 |
| 06-Oct-2016 |
Sean Bruno <[email protected]> |
Move netmap selinfo.h in to sensible location.
netmap_kern.h currently requires all drivers including it to include selinfo.h.
Submitted by: [email protected] Reviewed by: gnn MFC after: 2 weeks Di
Move netmap selinfo.h in to sensible location.
netmap_kern.h currently requires all drivers including it to include selinfo.h.
Submitted by: [email protected] Reviewed by: gnn MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D5334
show more ...
|