<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/dev/netmap, branch release/11.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F11.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2019-03-29T01:32:24Z</updated>
<entry>
<title>MFC r339683:</title>
<updated>2019-03-29T01:32:24Z</updated>
<author>
<name>Ravi Pokala</name>
<email>rpokala@FreeBSD.org</email>
</author>
<published>2019-03-29T01:32:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f22611dc00c2796c910df94c69527f33be647c95'/>
<id>urn:sha1:f22611dc00c2796c910df94c69527f33be647c95</id>
<content type='text'>
Remove redundant redeclaration of netmap_vp_reg().
This should unbreak sparc64 and powerpc LINT builds.

-- While this does fix that error, powerpc.LINT, powerpc.LINT64, and
-- sparc64.LINT are broken in stable/11 for other reasons. --rpokala

Sponsored by:	Panasas
</content>
</entry>
<entry>
<title>MFC r344510</title>
<updated>2019-02-28T09:42:03Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-28T09:42:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=0feb563be63ce224bf95231a51487440fb046b17'/>
<id>urn:sha1:0feb563be63ce224bf95231a51487440fb046b17</id>
<content type='text'>
netmap: remove redundant call to nm_set_native_flags()

This redundant call was introduced by mistake in r343772.

Sponsored by:   Sunny Valley Networks
</content>
</entry>
<entry>
<title>MFC r343579, r344253</title>
<updated>2019-02-25T09:13:33Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-25T09:13:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=98fe26932fe1d4af562a7ba2a6edf1c23295656a'/>
<id>urn:sha1:98fe26932fe1d4af562a7ba2a6edf1c23295656a</id>
<content type='text'>
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.
The change also 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_itglobal.com
Differential Revision:  https://reviews.freebsd.org/D18956
</content>
</entry>
<entry>
<title>MFC r343772, r343867</title>
<updated>2019-02-12T09:26:05Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-12T09:26:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=adf75b88b6bf12a8e23193335dcffd9cab6125a1'/>
<id>urn:sha1:adf75b88b6bf12a8e23193335dcffd9cab6125a1</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>MFC r343689</title>
<updated>2019-02-07T10:44:53Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-07T10:44:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=91db3f91e1a5b212db48bced260d3539148dd487'/>
<id>urn:sha1:91db3f91e1a5b212db48bced260d3539148dd487</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>MFC r343549</title>
<updated>2019-02-06T10:00:40Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-06T10:00:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e83cf8b55eb855051cac43804353e4871e2253f2'/>
<id>urn:sha1:e83cf8b55eb855051cac43804353e4871e2253f2</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>MFC r343346</title>
<updated>2019-02-06T09:49:42Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-06T09:49:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=333f75106685cb763b7f8cc5d1637659518d2d6f'/>
<id>urn:sha1:333f75106685cb763b7f8cc5d1637659518d2d6f</id>
<content type='text'>
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()
</content>
</entry>
<entry>
<title>MFC r343344</title>
<updated>2019-02-06T09:38:44Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-06T09:38:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=468f2bc0a33e5b7b94c5c5be4ac43372c0ff8098'/>
<id>urn:sha1:468f2bc0a33e5b7b94c5c5be4ac43372c0ff8098</id>
<content type='text'>
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 &lt;aleksandr.fedorov@itglobal.com&gt;
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D18876
</content>
</entry>
<entry>
<title>netmap: small cleanup on em, lem, igb, ixgbe</title>
<updated>2019-02-05T10:33:22Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-02-05T10:33:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a8c7eb7fcd00c9d85093bb66bba1e99a28ceda9e'/>
<id>urn:sha1:a8c7eb7fcd00c9d85093bb66bba1e99a28ceda9e</id>
<content type='text'>
Replace D, ND and RD macros with the corresponding nm_pr* ones.
</content>
</entry>
<entry>
<title>ixl: remove unnecessary limitations related to netmap</title>
<updated>2019-01-29T18:18:55Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2019-01-29T18:18:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d25a810097286924fa45823e5096473c8d9be26c'/>
<id>urn:sha1:d25a810097286924fa45823e5096473c8d9be26c</id>
<content type='text'>
Netmap supports the case where TX rings and RX rings have different size.
Remove unnecessary limitations related to netmap support, making the code
simpler.
Also, check that the value of the hw head index written back from the NIC
is valid.

Reviewed by:	erj
Differential Revision:	https://reviews.freebsd.org/D18984
</content>
</entry>
</feed>
