svn commit: r267187 - in head/sys/dev: e1000 ixgbe vmware/vmxnet3

Luigi Rizzo luigi at FreeBSD.org
Fri Jun 6 20:49:57 UTC 2014


Author: luigi
Date: Fri Jun  6 20:49:56 2014
New Revision: 267187
URL: http://svnweb.freebsd.org/changeset/base/267187

Log:
  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

Modified:
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/vmware/vmxnet3/if_vmx.c

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Fri Jun  6 20:35:40 2014	(r267186)
+++ head/sys/dev/e1000/if_igb.c	Fri Jun  6 20:49:56 2014	(r267187)
@@ -989,12 +989,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: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Fri Jun  6 20:35:40 2014	(r267186)
+++ head/sys/dev/ixgbe/ixgbe.c	Fri Jun  6 20:49:56 2014	(r267187)
@@ -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: head/sys/dev/vmware/vmxnet3/if_vmx.c
==============================================================================
--- head/sys/dev/vmware/vmxnet3/if_vmx.c	Fri Jun  6 20:35:40 2014	(r267186)
+++ head/sys/dev/vmware/vmxnet3/if_vmx.c	Fri Jun  6 20:49:56 2014	(r267187)
@@ -2935,7 +2935,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;
 		}
 
@@ -2958,7 +2957,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-head mailing list