From owner-svn-src-head@FreeBSD.ORG Sat Jan 25 20:00:06 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C15CC2EC; Sat, 25 Jan 2014 20:00:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [8.8.178.70]) (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 AE3001063; Sat, 25 Jan 2014 20:00:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0PJwrPe071838; Sat, 25 Jan 2014 19:58:53 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0PJwr9w071837; Sat, 25 Jan 2014 19:58:53 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201401251958.s0PJwr9w071837@svn.freebsd.org> From: Bryan Venteicher Date: Sat, 25 Jan 2014 19:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261168 - 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-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 20:00:06 -0000 Author: bryanv Date: Sat Jan 25 19:58:53 2014 New Revision: 261168 URL: http://svnweb.freebsd.org/changeset/base/261168 Log: Check for a full virtqueue in the multiqueue transmit path With most hosts, we'll negotiate indirect descriptors, so all we need is one available descriptor to transmit a frame. 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 Jan 25 19:57:30 2014 (r261167) +++ head/sys/dev/virtio/network/if_vtnet.c Sat Jan 25 19:58:53 2014 (r261168) @@ -2243,6 +2243,12 @@ vtnet_txq_mq_start_locked(struct vtnet_t vtnet_txq_eof(txq); while ((m = drbr_peek(ifp, br)) != NULL) { + if (virtqueue_full(vq)) { + drbr_putback(ifp, br, m); + error = ENOBUFS; + break; + } + error = vtnet_txq_encap(txq, &m); if (error) { if (m != NULL)