diff options
author | luigi <luigi@FreeBSD.org> | 2014-06-06 20:49:56 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2014-06-06 20:49:56 +0000 |
commit | 9ac87082af9b17133c68fbe60f507d91fae553b5 (patch) | |
tree | d26926b97a738891d48af72382ec34eb61406252 | |
parent | f9e9ff2d7722a3477652a71708015c4c012d6826 (diff) | |
download | FreeBSD-src-9ac87082af9b17133c68fbe60f507d91fae553b5.zip FreeBSD-src-9ac87082af9b17133c68fbe60f507d91fae553b5.tar.gz |
make sure if_transmit returns 0 if the mbuf is enqueued.
ixgbe/ixv.c still needs a similar fix but it takes a little
more restructuring of the code.
MFC after: 3 days
-rw-r--r-- | sys/dev/e1000/if_igb.c | 4 | ||||
-rw-r--r-- | sys/dev/ixgbe/ixgbe.c | 4 | ||||
-rw-r--r-- | sys/dev/vmware/vmxnet3/if_vmx.c | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index 2322e56..39a7df6 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -989,12 +989,12 @@ igb_mq_start(struct ifnet *ifp, struct mbuf *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 diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c index c3b3fd6..774827c 100644 --- a/sys/dev/ixgbe/ixgbe.c +++ b/sys/dev/ixgbe/ixgbe.c @@ -831,12 +831,12 @@ ixgbe_mq_start(struct ifnet *ifp, struct mbuf *m) 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 diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index e349770..cb9214f 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -2935,7 +2935,6 @@ vmxnet3_txq_mq_start_locked(struct vmxnet3_txqueue *txq, struct mbuf *m) /* 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; } @@ -2958,7 +2957,7 @@ vmxnet3_txq_mq_start_locked(struct vmxnet3_txqueue *txq, struct mbuf *m) txq->vxtxq_watchdog = VMXNET3_WATCHDOG_TIMEOUT; } - return (error); + return (0); } static int |