Date: Mon, 13 Aug 2012 19:14:45 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239242 - head/sys/dev/netmap Message-ID: <201208131914.q7DJEjIT081503@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Aug 13 19:14:45 2012 New Revision: 239242 URL: http://svn.freebsd.org/changeset/base/239242 Log: Reword comment to try to improve clarity, and fix a typo. Modified: head/sys/dev/netmap/ixgbe_netmap.h Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Mon Aug 13 18:52:51 2012 (r239241) +++ head/sys/dev/netmap/ixgbe_netmap.h Mon Aug 13 19:14:45 2012 (r239242) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208131914.q7DJEjIT081503>