Date: Wed, 4 Jun 2014 16:57:05 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267065 - head/sys/dev/virtio/network Message-ID: <201406041657.s54Gv5S0001073@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Wed Jun 4 16:57:05 2014 New Revision: 267065 URL: http://svnweb.freebsd.org/changeset/base/267065 Log: make sure ifp->if_transmit returns 0 if a buffer is enqueued. A similar fix should be applied to vmxnet, ixgbe, igb, i40e. (some of them previously reported by Michael Tuexen) Drivers using if_transmit are correct, and so are most of the other drivers that reassing if_transmit. Among other things, this bug causes panics when using netmap emulation on top of generic drivers. Approved by: bryanv MFC after: 3 days 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 Wed Jun 4 16:55:38 2014 (r267064) +++ head/sys/dev/virtio/network/if_vtnet.c Wed Jun 4 16:57:05 2014 (r267065) @@ -2262,7 +2262,6 @@ vtnet_txq_mq_start_locked(struct vtnet_t while ((m = drbr_peek(ifp, br)) != NULL) { if (virtqueue_full(vq)) { drbr_putback(ifp, br, m); - error = ENOBUFS; break; } @@ -2285,7 +2284,7 @@ vtnet_txq_mq_start_locked(struct vtnet_t txq->vtntx_watchdog = VTNET_TX_TIMEOUT; } - return (error); + return (0); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406041657.s54Gv5S0001073>