svn commit: r267065 - head/sys/dev/virtio/network
Luigi Rizzo
luigi at FreeBSD.org
Wed Jun 4 16:57:06 UTC 2014
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
More information about the svn-src-all
mailing list