|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0 |
|
| #
a44270bd |
| 15-Jul-2019 |
Vincenzo Maffione <[email protected]> |
MFC r349581
netmap: fix two panics with emulated adapter
This patch fixes 2 panics. The first one is due to the current VNET not being set in the emulated adapter transmission path. The second one
MFC r349581
netmap: fix two panics with emulated adapter
This patch fixes 2 panics. The first one is due to the current VNET not being set in the emulated adapter transmission path. The second one is caused by the M_PKTHDR flag not being set when preallocated mbufs are recycled in the transmit path.
Submitted by: [email protected] Reviewed by: vmaffione Differential Revision: https://reviews.freebsd.org/D20824
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
c328e25c |
| 25-Feb-2019 |
Vincenzo Maffione <[email protected]> |
MFC r344253
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_seli
MFC r344253
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]> Differential Revision: https://reviews.freebsd.org/D19177
show more ...
|
| #
e8cc65cd |
| 13-Feb-2019 |
Vincenzo Maffione <[email protected]> |
MFC r343579
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 c
MFC r343579
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 Differential Revision: https://reviews.freebsd.org/D18956
show more ...
|
| #
01e8e2c2 |
| 12-Feb-2019 |
Vincenzo Maffione <[email protected]> |
MFC r343772, r343867
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
MFC r343772, r343867
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.
show more ...
|
| #
e2e0ef76 |
| 06-Feb-2019 |
Vincenzo Maffione <[email protected]> |
MFC r343549
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.
|
| #
a6c48544 |
| 06-Feb-2019 |
Vincenzo Maffione <[email protected]> |
MFC r343344
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
MFC r343344
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 ...
|
| #
b321acab |
| 11-Dec-2018 |
Vincenzo Maffione <[email protected]> |
MFC r341516, r341589
netmap: align codebase to the current upstream (760279cfb2730a585)
Changelist: - Replace netmap passthrough host support with a more general mechanism to call TXSYNC/RXSY
MFC r341516, r341589
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 ...
|
|
Revision tags: release/12.0.0 |
|
| #
e95ce845 |
| 01-Dec-2018 |
Vincenzo Maffione <[email protected]> |
MFC r341144
netmap: set IFCAP_NETMAP in if_capabilities
Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP in if_capabilities on netmap_attach. This patch reverts this change.
D
MFC r341144
netmap: set IFCAP_NETMAP in if_capabilities
Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP in if_capabilities on netmap_attach. This patch reverts this change.
Differential Revision: https://reviews.freebsd.org/D17987
show more ...
|
| #
d740f837 |
| 30-Oct-2018 |
Vincenzo Maffione <[email protected]> |
MFC r339639:
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 reu
MFC r339639:
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: re (gjb)
show more ...
|
| #
53e992cf |
| 14-Aug-2018 |
David Bright <[email protected]> |
Fix several memory leaks.
The libkqueue tests have several places that leak memory by using an idiom like:
puts(kevent_to_str(kevp));
Rework to save the pointer returned from kevent_to_str() and t
Fix several memory leaks.
The libkqueue tests have several places that leak memory by using an idiom like:
puts(kevent_to_str(kevp));
Rework to save the pointer returned from kevent_to_str() and then free() it after it has been used.
Reported by: asomers (pointer to Coverity), Coverity CID: 1296063, 1296064, 1296065, 1296066, 1296067, 1350287, 1394960 Sponsored by: Dell EMC
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
3535fae8 |
| 19-May-2018 |
Matt Macy <[email protected]> |
netmap: compare e1 with e2, not with itself
|
| #
cfa866f6 |
| 18-May-2018 |
Matt Macy <[email protected]> |
netmap: pull fix for 32-bit support from upstream
Approved by: sbruno
|
| #
1315f9b5 |
| 13-Apr-2018 |
Brooks Davis <[email protected]> |
Fix build on 32-bit systems.
|
| #
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 ...
|
| #
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 |
|
| #
4dd44461 |
| 21-Jul-2017 |
Luiz Otavio O Souza <[email protected]> |
Restore the changes done in r313982: Replace zero with NULL for pointers.
Spotted by: Harry Schmalzbauer MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate)
|
|
Revision tags: 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 ...
|
| #
4d24901a |
| 20-Feb-2017 |
Pedro F. Giffuni <[email protected]> |
sys/dev: Replace zero with NULL for pointers.
Makes things easier to read, plus architectures may set NULL to something different than zero.
Found with: devel/coccinelle MFC after: 3 weeks
|
| #
67ca1051 |
| 02-Jan-2017 |
Adrian Chadd <[email protected]> |
[netmap] call RLOCK /and/ RUNLOCK.
Reported by: olivier
|
| #
869d8878 |
| 30-Dec-2016 |
Adrian Chadd <[email protected]> |
[netmap] fix locking regressions
* Firmware oriented NICs may need to sleep in their configuration paths. Use RLOCK instead of WLOCK to allow this to again occur.
This fixes netmap on cxgbe.
*
[netmap] fix locking regressions
* Firmware oriented NICs may need to sleep in their configuration paths. Use RLOCK instead of WLOCK to allow this to again occur.
This fixes netmap on cxgbe.
* Change the worker lock to a normal mutex rather than a spin lock. Drivers shouldn't be doing netmap work from the fast interrupt handlers, so it's not required to be a spinlock.
Submitted by: luigi, Vincenzo Maffione <[email protected]> Reviewed by: jhb
show more ...
|
| #
54c7693f |
| 30-Nov-2016 |
Ed Maste <[email protected]> |
netmap: add cast to fix powerpc64 LINT kernel
Attempt to fix powerpc64 LINT kernel broken by r308000. Netmap's use of a uint64_t wchan seems odd, but in the interest of minimizing this change just c
netmap: add cast to fix powerpc64 LINT kernel
Attempt to fix powerpc64 LINT kernel broken by r308000. Netmap's use of a uint64_t wchan seems odd, but in the interest of minimizing this change just cast through uintptr_t to silence the compiler warning.
Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8669
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 ...
|
| #
ffaa5deb |
| 21-Oct-2016 |
Sepherosa Ziehau <[email protected]> |
netmap: Unbreak LINT-VIMAGE building
Sponsored by: Microsoft
|
| #
e3f94e51 |
| 21-Oct-2016 |
Sepherosa Ziehau <[email protected]> |
netmap: Unbreak i386 LINT building
Sponsored by: Microsoft
|