diff options
author | emaste <emaste@FreeBSD.org> | 2012-08-13 19:14:45 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2012-08-13 19:14:45 +0000 |
commit | 1c5f3b6a9fa142516befd3b82fff6e202e95b6bd (patch) | |
tree | 426f484499bffcc9bb1746766af960519857790a /sys/dev/netmap/ixgbe_netmap.h | |
parent | 7d55435a891039931540cc173244912a7acb20f3 (diff) | |
download | FreeBSD-src-1c5f3b6a9fa142516befd3b82fff6e202e95b6bd.zip FreeBSD-src-1c5f3b6a9fa142516befd3b82fff6e202e95b6bd.tar.gz |
Reword comment to try to improve clarity, and fix a typo.
Diffstat (limited to 'sys/dev/netmap/ixgbe_netmap.h')
-rw-r--r-- | sys/dev/netmap/ixgbe_netmap.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/netmap/ixgbe_netmap.h b/sys/dev/netmap/ixgbe_netmap.h index eefb4df..55bd21f 100644 --- a/sys/dev/netmap/ixgbe_netmap.h +++ b/sys/dev/netmap/ixgbe_netmap.h @@ -198,14 +198,17 @@ fail: * Reconcile kernel and user view of the transmit ring. * This routine might be called frequently so it must be efficient. * - * Userspace has filled tx slots up to ring->cur (excluded). - * The last unused slot previously known to the kernel was kring->nkr_hwcur, - * and the last interrupt reported kring->nr_hwavail slots available. + * ring->cur holds the userspace view of the current ring index. Userspace + * has filled the tx slots from the previous call's ring->cur up to but not + * including ring->cur for this call. In this function the kernel updates + * kring->nr_hwcur to ring->cur, thus slots [kring->nr_hwcur, ring->cur) are + * now ready to transmit. At the last interrupt kring->nr_hwavail slots were + * available. * * This function runs under lock (acquired from the caller or internally). * It must first update ring->avail to what the kernel knows, - * subtract the newly used slots (ring->cur - kring->nkr_hwcur) - * from both avail and nr_hwavail, and set ring->nkr_hwcur = ring->cur + * subtract the newly used slots (ring->cur - kring->nr_hwcur) + * from both avail and nr_hwavail, and set ring->nr_hwcur = ring->cur * issuing a dmamap_sync on all slots. * * Since ring comes from userspace, its content must be read only once, |