svn commit: r267279 - in stable/10/sys/dev: e1000 ixgbe virtio/network vmware/vmxnet3
Luigi Rizzo
luigi at FreeBSD.org
Mon Jun 9 15:09:07 UTC 2014
Author: luigi
Date: Mon Jun 9 15:09:05 2014
New Revision: 267279
URL: http://svnweb.freebsd.org/changeset/base/267279
Log:
MFC svn 267065 and 267187
make sure ifp->if_transmit returns 0 if a buffer is enqueued.
This should also be merged to stable/9.
After this fix, drivers still known to have this bug are igxbe/ixv
and i40e.
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.
Modified:
stable/10/sys/dev/e1000/if_igb.c
stable/10/sys/dev/ixgbe/ixgbe.c
stable/10/sys/dev/virtio/network/if_vtnet.c
stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
Modified: stable/10/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/10/sys/dev/e1000/if_igb.c Mon Jun 9 15:00:43 2014 (r267278)
+++ stable/10/sys/dev/e1000/if_igb.c Mon Jun 9 15:09:05 2014 (r267279)
@@ -988,12 +988,12 @@ igb_mq_start(struct ifnet *ifp, struct m
if (err)
return (err);
if (IGB_TX_TRYLOCK(txr)) {
- err = igb_mq_start_locked(ifp, txr);
+ igb_mq_start_locked(ifp, txr);
IGB_TX_UNLOCK(txr);
} else
taskqueue_enqueue(que->tq, &txr->txq_task);
- return (err);
+ return (0);
}
static int
Modified: stable/10/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- stable/10/sys/dev/ixgbe/ixgbe.c Mon Jun 9 15:00:43 2014 (r267278)
+++ stable/10/sys/dev/ixgbe/ixgbe.c Mon Jun 9 15:09:05 2014 (r267279)
@@ -831,12 +831,12 @@ ixgbe_mq_start(struct ifnet *ifp, struct
if (err)
return (err);
if (IXGBE_TX_TRYLOCK(txr)) {
- err = ixgbe_mq_start_locked(ifp, txr);
+ ixgbe_mq_start_locked(ifp, txr);
IXGBE_TX_UNLOCK(txr);
} else
taskqueue_enqueue(que->tq, &txr->txq_task);
- return (err);
+ return (0);
}
static int
Modified: stable/10/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jun 9 15:00:43 2014 (r267278)
+++ stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jun 9 15:09:05 2014 (r267279)
@@ -2260,7 +2260,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;
}
@@ -2283,7 +2282,7 @@ vtnet_txq_mq_start_locked(struct vtnet_t
txq->vtntx_watchdog = VTNET_TX_TIMEOUT;
}
- return (error);
+ return (0);
}
static int
Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 9 15:00:43 2014 (r267278)
+++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 9 15:09:05 2014 (r267279)
@@ -2933,7 +2933,6 @@ vmxnet3_txq_mq_start_locked(struct vmxne
/* Assume worse case if this mbuf is the head of a chain. */
if (m->m_next != NULL && avail < VMXNET3_TX_MAXSEGS) {
drbr_putback(ifp, br, m);
- error = ENOBUFS;
break;
}
@@ -2956,7 +2955,7 @@ vmxnet3_txq_mq_start_locked(struct vmxne
txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT;
}
- return (error);
+ return (0);
}
static int
More information about the svn-src-all
mailing list