| #
bb714db6
|
| 10-Jan-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: vtnet: enable/disable krings on any interface reinit
See 3d65fd97e85ab807f3b for a detailed explanation.
PR: 252453 MFC after: 1 week
|
| #
7ba6ecf2
|
| 09-Jan-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: refactor netmap_reset
The netmap_reset() function is meant to be called by the driver when they initialize (or re-initialize) a hardware ring. However, since the introduction of support for
netmap: refactor netmap_reset
The netmap_reset() function is meant to be called by the driver when they initialize (or re-initialize) a hardware ring. However, since the introduction of support for opening (in netmap mode) a subset of the available rings, netmap_reset() may be called multiple times on actively used rings, causing both kring and netmap ring to transition to an inconsistent state. This changes improves the situation by resetting all the indices fields of the kring to 0, as expected after the reinitialization of a hardware ring.
PR: 252518 MFC after: 1 week
show more ...
|
| #
1d238b07
|
| 09-Jan-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: iflib: stop krings during interface reset
When different processes open separate subsets of the available rings of a same netmap interface, a device reset may be performed while one of the p
netmap: iflib: stop krings during interface reset
When different processes open separate subsets of the available rings of a same netmap interface, a device reset may be performed while one of the processes is actively using some rings (e.g., caused by another process executing a nmport_open()). With this patch, such situation will cause the active process to get a POLLERR, so that it can have a chance to detect the situation. We also guarantee that no process is running a txsync or rxsync (ioctl or poll) while an iflib device reset is in progress.
PR: 252453 MFC after: 1 week
show more ...
|
| #
e2515283
|
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
| #
b7d69138
|
| 24-Aug-2020 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: use FreeBSD guards for epoch calls
EPOCH calls are FreeBSD specific. Use guards to protect these, so that the code can compile under Linux.
MFC after: 1 week
|
| #
75dfc66c
|
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
| #
7029da5c
|
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
| #
051669e8
|
| 25-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356931 through r357118.
|
| #
a4470078
|
| 23-Jan-2020 |
Gleb Smirnoff <glebius@FreeBSD.org> |
In netmap() call ether_input() within the network epoch.
|
| #
760fa2ab
|
| 20-Oct-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: minor misc improvements
- use ring->head rather than ring->cur in lb(8) - use strlcat() rather than strncat() - fix bandwidth computation in pkt-gen(8)
MFC after: 1 week
|
| #
c5c3ba6b
|
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
| #
253b2ec1
|
| 01-Sep-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
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
|
| #
2aaf9152
|
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|
| #
d12354a5
|
| 18-Mar-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: add support for multiple host rings
Some applications forward from/to host rings most or all the traffic received or sent on a physical interface. In this cases it is desirable to have more
netmap: add support for multiple host rings
Some applications forward from/to host rings most or all the traffic received or sent on a physical interface. In this cases it is desirable to have more than a pair of RX/TX host rings, and use multiple threads to speed up forwarding. This change adds support for multiple host rings. On registering a netmap port, the user can specify the number of desired receive and transmit host rings in the nr_host_tx_rings and nr_host_rx_rings fields of the nmreq_register structure.
MFC after: 2 weeks
show more ...
|
| #
9e43c218
|
| 10-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343807 through r343955.
|
| #
1ef2a881
|
| 07-Feb-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: revert netmap_attach_ext() to pre-r343772
Reported by: marius MFC after: 1 week
|
| #
8e69ae1c
|
| 05-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343712 through r343806.
|
| #
75f4f3ed
|
| 05-Feb-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
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 ...
|
| #
c2c227a5
|
| 03-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343571 through r343711.
|
| #
5faab778
|
| 02-Feb-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
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 <vmaffione@FreeBSD.org> |
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 ...
|
| #
7e565c55
|
| 30-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343320 through r343570.
|
| #
8c9874f5
|
| 23-Jan-2019 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
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 <aleksandr.fedorov@itglobal.com> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18876
show more ...
|
| #
58e18542
|
| 22-Dec-2018 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: fix txsync check in netmap poll
To check if txsync can be skipped, it is necessary to look for unseen TX space. However, this means comparing ring->cur against ring->tail, rather than ring->
netmap: fix txsync check in netmap poll
To check if txsync can be skipped, it is necessary to look for unseen TX space. However, this means comparing ring->cur against ring->tail, rather than ring->head against ring->tail (like nm_ring_empty() does). This change also adds some more comments to explain the optimization performed at the beginning of netmap_poll().
MFC after: 3 days Sponsored by: Sunny Valley Networks
show more ...
|
| #
e1ed1fbd
|
| 22-Dec-2018 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: fix bug in netmap_poll() optimization
The bug was introduced by r339639, although it is present in the upstream netmap code since 2015. It is due to resetting the want_rx variable to POLLIN,
netmap: fix bug in netmap_poll() optimization
The bug was introduced by r339639, although it is present in the upstream netmap code since 2015. It is due to resetting the want_rx variable to POLLIN, rather than resetting it to POLLIN|POLLRDNORM. It only affects select(), which uses POLLRDNORM. poll() is not affected, because it uses POLLIN. Also, it only affects FreeBSD, because Linux skips the optimization implemented by the piece of code where the bug occurs.
MFC after: 3 days Sponsored by: Sunny Valley Networks
show more ...
|