|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0 |
|
| #
b507f690 |
| 15-Jul-2019 |
Vincenzo Maffione <[email protected]> |
MFC r349966
netmap: fix bug introduced by r349752
r349752 introduced a NULL pointer reference bug in the emulated netmap code.
Reported by: lwhsu
|
| #
4c01d6a6 |
| 11-Jul-2019 |
Vincenzo Maffione <[email protected]> |
MFC r349752
netmap: fix kernel pointer printing in netmap_generic.c
Print the adapter name rather than the address of the adapter to avoid kernel address leakage.
PR: Bug 238642 Submit
MFC r349752
netmap: fix kernel pointer printing in netmap_generic.c
Print the adapter name rather than the address of the adapter to avoid kernel address leakage.
PR: Bug 238642 Submitted by: Fuqian Huang <[email protected]> Reviewed by: vmaffione
show more ...
|
|
Revision tags: release/11.3.0 |
|
| #
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 ...
|
| #
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 |
|
| #
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 ...
|
|
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 ...
|
| #
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 ...
|
| #
e8fd18f3 |
| 09-Oct-2017 |
Gleb Smirnoff <[email protected]> |
Shorten list of arguments to mbuf external storage freeing function.
All of these arguments are stored in m_ext, so there is no reason to pass them in the argument list. Not all functions need the
Shorten list of arguments to mbuf external storage freeing function.
All of these arguments are stored in m_ext, so there is no reason to pass them in the argument list. Not all functions need the second argument, some don't even need the first one. The second argument lives in next cache line, so not dereferencing it is a performance gain. This was discovered in sendfile(2), which will be covered by next commits.
The second goal of this commit is to bring even more flexibility to m_ext mbufs, allowing to create more fields in m_ext, opaque to the generic mbuf code, and potentially set and dereferenced by subsystems.
Reviewed by: gallatin, kbowling Differential Revision: https://reviews.freebsd.org/D12615
show more ...
|
|
Revision tags: release/10.4.0 |
|
| #
a02dbe4c |
| 21-Jul-2017 |
Luiz Otavio O Souza <[email protected]> |
Do not allow the use of the loopback interface in netmap.
The generic support in netmap send the packets using if_transmit() and the loopback do not support packets coming from if_transmit()/if_star
Do not allow the use of the loopback interface in netmap.
The generic support in netmap send the packets using if_transmit() and the loopback do not support packets coming from if_transmit()/if_start().
This avoids the use of the loopback interface and the subsequent crash that happens when the application send packets to the loopback interface.
Details in: https://github.com/luigirizzo/netmap/issues/322 Reported by: Vincenzo Maffione <[email protected]> Sponsored by: Rubicon Communications, LLC (Netgate)
show more ...
|
|
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 ...
|
| #
4c55b4e8 |
| 14-Feb-2017 |
Mark Johnston <[email protected]> |
Unbreak the gcc build of netmap.
This fixes several LINT targets.
Reviewed by: Vincenzo Maffione
|
| #
25a33410 |
| 12-Jan-2017 |
Sean Bruno <[email protected]> |
Fix panic on mb_free_ext() due to NULL destructor.
This used to happen because of the SET_MBUF_DESTRUCTOR() called on unregif.
Submitted by: Vincenzo Maffione <[email protected]>
|
| #
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 ...
|
| #
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 ...
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
453130d9 |
| 03-May-2016 |
Pedro F. Giffuni <[email protected]> |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
| #
fddd4f62 |
| 26-Mar-2016 |
Navdeep Parhar <[email protected]> |
Plug leak in m_unshare.
m_unshare passes on the source mbuf's flags as-is to m_getcl and this results in a leak if the flags include M_NOFREE. The fix is to clear the bits not listed in M_COPYALL b
Plug leak in m_unshare.
m_unshare passes on the source mbuf's flags as-is to m_getcl and this results in a leak if the flags include M_NOFREE. The fix is to clear the bits not listed in M_COPYALL before calling m_getcl. M_RDONLY should probably be filtered out too but that's outside the scope of this fix.
Add assertions in the zone_mbuf and zone_pack ctors to catch similar bugs.
Update netmap_get_mbuf to not pass M_NOFREE to m_getcl. It's not clear what the original code was trying to do but it's likely incorrect. Updated code is no different functionally but it avoids the newly added assertions.
Reviewed by: gnn@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D5698
show more ...
|
|
Revision tags: release/10.3.0, release/10.2.0 |
|
| #
847bf383 |
| 10-Jul-2015 |
Luigi Rizzo <[email protected]> |
Sync netmap sources with the version in our private tree. This commit contains large contributions from Giuseppe Lettieri and Stefano Garzarella, is partly supported by grants from Verisign and Cisco
Sync netmap sources with the version in our private tree. This commit contains large contributions from Giuseppe Lettieri and Stefano Garzarella, is partly supported by grants from Verisign and Cisco, and brings in the following:
- fix zerocopy monitor ports and introduce copying monitor ports (the latter are lower performance but give access to all traffic in parallel with the application)
- exclusive open mode, useful to implement solutions that recover from crashes of the main netmap client (suggested by Patrick Kelsey)
- revised memory allocator in preparation for the 'passthrough mode' (ptnetmap) recently presented at bsdcan. ptnetmap is described in S. Garzarella, G. Lettieri, L. Rizzo; Virtual device passthrough for high speed VM networking, ACM/IEEE ANCS 2015, Oakland (CA) May 2015 http://info.iet.unipi.it/~luigi/research.html
- fix rx CRC handing on ixl
- add module dependencies for netmap when building drivers as modules
- minor simplifications to device-specific routines (*txsync, *rxsync)
- general code cleanup (remove unused variables, introduce macros to access rings and remove duplicate code,
Applications do not need to be recompiled, unless of course they want to use the new features (monitors and exclusive open).
Those willing to try this code on stable/10 can just update the sys/dev/netmap/*, sys/net/netmap* with the version in HEAD and apply the small patches to individual device drivers.
MFC after: 1 month Sponsored by: (partly) Verisign, Cisco
show more ...
|
|
Revision tags: release/10.1.0 |
|
| #
db5cb211 |
| 10-Nov-2014 |
Luigi Rizzo <[email protected]> |
sync a comment with our internal repo
|
| #
4bf50f18 |
| 16-Aug-2014 |
Luigi Rizzo <[email protected]> |
Update to the current version of netmap. Mostly bugfixes or features developed in the past 6 months, so this is a 10.1 candidate.
Basically no user API changes (some bugfixes in sys/net/netmap_user.
Update to the current version of netmap. Mostly bugfixes or features developed in the past 6 months, so this is a 10.1 candidate.
Basically no user API changes (some bugfixes in sys/net/netmap_user.h).
In detail:
1. netmap support for virtio-net, including in netmap mode. Under bhyve and with a netmap backend [2] we reach over 1Mpps with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.
2. (kernel) add support for multiple memory allocators, so we can better partition physical and virtual interfaces giving access to separate users. The most visible effect is one additional argument to the various kernel functions to compute buffer addresses. All netmap-supported drivers are affected, but changes are mechanical and trivial
3. (kernel) simplify the prototype for *txsync() and *rxsync() driver methods. All netmap drivers affected, changes mostly mechanical.
4. add support for netmap-monitor ports. Think of it as a mirroring port on a physical switch: a netmap monitor port replicates traffic present on the main port. Restrictions apply. Drive carefully.
5. if_lem.c: support for various paravirtualization features, experimental and disabled by default. Most of these are described in our ANCS'13 paper [1]. Paravirtualized support in netmap mode is new, and beats the numbers in the paper by a large factor (under qemu-kvm, we measured gues-host throughput up to 10-12 Mpps).
A lot of refactoring and additional documentation in the files in sys/dev/netmap, but apart from #2 and #3 above, almost nothing of this stuff is visible to other kernel parts.
Example programs in tools/tools/netmap have been updated with bugfixes and to support more of the existing features.
This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.
A lot of this code has been contributed by my colleagues at UNIPI, including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.
MFC after: 3 days.
show more ...
|
| #
fcc34a23 |
| 11-Jul-2014 |
Gleb Smirnoff <[email protected]> |
Fix style bug: rename the refcount field of m_ext to ext_cnt, to match other members.
Sponsored by: Nginx, Inc.
|
|
Revision tags: release/9.3.0 |
|
| #
63a3395e |
| 10-Jun-2014 |
Luigi Rizzo <[email protected]> |
change the netmap mbuf destructor so the same code works also on FreeBSD 9. For head and 10 this change has no effect, but on stable/9 it would cause panics when using emulated netmap on top of a sta
change the netmap mbuf destructor so the same code works also on FreeBSD 9. For head and 10 this change has no effect, but on stable/9 it would cause panics when using emulated netmap on top of a standard device driver.
show more ...
|
| #
e4166283 |
| 06-Jun-2014 |
Luigi Rizzo <[email protected]> |
better handling of netmap emulation over standard device drivers: plug a potential mbuf leak, and detect bogus drivers that return ENOBUFS even when the packet has been queued.
MFC after: 3 days
|
| #
0dc809c0 |
| 06-Jun-2014 |
Luigi Rizzo <[email protected]> |
move netmap_getna() to a freebsd-specific file
|