aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_kern.h
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2014-06-06 14:58:25 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2014-06-06 14:58:25 +0000
commit89cc25561cb329c74971d89ca7cd99728e6b659d (patch)
tree63be0843314cb9492371ec9c02723093b55a90fa /sys/dev/netmap/netmap_kern.h
parentd8e1c53b158c6b634e627d6f47304fedd4769c1a (diff)
Notes
Diffstat (limited to 'sys/dev/netmap/netmap_kern.h')
-rw-r--r--sys/dev/netmap/netmap_kern.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h
index dd5d058fafca9..401195e3b72dc 100644
--- a/sys/dev/netmap/netmap_kern.h
+++ b/sys/dev/netmap/netmap_kern.h
@@ -183,9 +183,6 @@ extern NMG_LOCK_T netmap_global_lock;
* the next empty buffer as known by the hardware (next_to_check or so).
* TX rings: hwcur + hwofs coincides with next_to_send
*
- * Clients cannot issue concurrent syscall on a ring. The system
- * detects this and reports an error using two flags,
- * NKR_WBUSY and NKR_RBUSY
* For received packets, slot->flags is set to nkr_slot_flags
* so we can provide a proper initial value (e.g. set NS_FORWARD
* when operating in 'transparent' mode).
@@ -208,7 +205,7 @@ extern NMG_LOCK_T netmap_global_lock;
* The kring is manipulated by txsync/rxsync and generic netmap function.
*
* Concurrent rxsync or txsync on the same ring are prevented through
- * by nm_kr_lock() which in turn uses nr_busy. This is all we need
+ * by nm_kr_(try)lock() which in turn uses nr_busy. This is all we need
* for NIC rings, and for TX rings attached to the host stack.
*
* RX rings attached to the host stack use an mbq (rx_queue) on both
@@ -440,15 +437,18 @@ struct netmap_adapter {
/*
* nm_dtor() is the cleanup routine called when destroying
* the adapter.
+ * Called with NMG_LOCK held.
*
* nm_register() is called on NIOCREGIF and close() to enter
* or exit netmap mode on the NIC
+ * Called with NMG_LOCK held.
*
* nm_txsync() pushes packets to the underlying hw/switch
*
* nm_rxsync() collects packets from the underlying hw/switch
*
* nm_config() returns configuration information from the OS
+ * Called with NMG_LOCK held.
*
* nm_krings_create() create and init the krings array
* (the array layout must conform to the description
@@ -456,13 +456,12 @@ struct netmap_adapter {
*
* nm_krings_delete() cleanup and delete the kring array
*
- * nm_notify() is used to act after data have become available.
+ * nm_notify() is used to act after data have become available
+ * (or the stopped state of the ring has changed)
* For hw devices this is typically a selwakeup(),
* but for NIC/host ports attached to a switch (or vice-versa)
* we also need to invoke the 'txsync' code downstream.
*/
-
- /* private cleanup */
void (*nm_dtor)(struct netmap_adapter *);
int (*nm_register)(struct netmap_adapter *, int onoff);