From owner-svn-src-stable-9@FreeBSD.ORG Mon Nov 19 19:31:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B1D3A7D1; Mon, 19 Nov 2012 19:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF4B8FC08; Mon, 19 Nov 2012 19:31:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAJJVt61028776; Mon, 19 Nov 2012 19:31:55 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAJJVt90028775; Mon, 19 Nov 2012 19:31:55 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201211191931.qAJJVt90028775@svn.freebsd.org> From: Ed Maste Date: Mon, 19 Nov 2012 19:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r243306 - stable/9/sys/dev/netmap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 19:31:55 -0000 Author: emaste Date: Mon Nov 19 19:31:55 2012 New Revision: 243306 URL: http://svnweb.freebsd.org/changeset/base/243306 Log: MFC r239242: Reword comment to try to improve clarity, and fix a typo. Modified: stable/9/sys/dev/netmap/ixgbe_netmap.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- stable/9/sys/dev/netmap/ixgbe_netmap.h Mon Nov 19 19:31:54 2012 (r243305) +++ stable/9/sys/dev/netmap/ixgbe_netmap.h Mon Nov 19 19:31:55 2012 (r243306) @@ -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,