From owner-svn-src-all@FreeBSD.ORG Sat Oct 5 18:07:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 80BF4B5D; Sat, 5 Oct 2013 18:07:25 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0B32E34; Sat, 5 Oct 2013 18:07:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r95I7Pva048590; Sat, 5 Oct 2013 18:07:25 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r95I7P0M048589; Sat, 5 Oct 2013 18:07:25 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201310051807.r95I7P0M048589@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 5 Oct 2013 18:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256066 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 18:07:25 -0000 Author: bryanv Date: Sat Oct 5 18:07:24 2013 New Revision: 256066 URL: http://svnweb.freebsd.org/changeset/base/256066 Log: Do not hold the vtnet Rx queue lock when calling up into the stack This matches other similar drivers and avoids various LOR warnings. Approved by: re (marius) Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Sat Oct 5 16:22:33 2013 (r256065) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Oct 5 18:07:24 2013 (r256066) @@ -1700,9 +1700,9 @@ vtnet_rxq_input(struct vtnet_rxq *rxq, s rxq->vtnrx_stats.vrxs_ipackets++; rxq->vtnrx_stats.vrxs_ibytes += m->m_pkthdr.len; - /* VTNET_RXQ_UNLOCK(rxq); */ + VTNET_RXQ_UNLOCK(rxq); (*ifp->if_input)(ifp, m); - /* VTNET_RXQ_LOCK(rxq); */ + VTNET_RXQ_LOCK(rxq); } static int @@ -1782,6 +1782,10 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) m_adj(m, adjsz); vtnet_rxq_input(rxq, m, hdr); + + /* Must recheck after dropping the Rx lock. */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; } if (deq > 0)