summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2013-08-13 00:25:39 +0000
committerjfv <jfv@FreeBSD.org>2013-08-13 00:25:39 +0000
commit346033d48721c1b1a962a58bfccf2b821b74277f (patch)
treed5292fb5851302d75a27a5122c9f20c1fa608103
parent28bd1409da1e9911c4152b06c5c7b89235e2b17a (diff)
downloadFreeBSD-src-346033d48721c1b1a962a58bfccf2b821b74277f.zip
FreeBSD-src-346033d48721c1b1a962a58bfccf2b821b74277f.tar.gz
Alter the mq_start routine to do a TRYLOCK and call to the locked routine
rather than just queueing. The former code was an attempt at getting UDP performance up, but there have been customer reports of problems with it, so the ixgbe approach seems the best solution for now.
-rw-r--r--sys/dev/e1000/if_igb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 65f4205..6887bcf 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -972,7 +972,13 @@ igb_mq_start(struct ifnet *ifp, struct mbuf *m)
que = &adapter->queues[i];
err = drbr_enqueue(ifp, txr->br, m);
- taskqueue_enqueue(que->tq, &txr->txq_task);
+ if (err)
+ return (err);
+ if (IGB_TX_TRYLOCK(txr)) {
+ err = igb_mq_start_locked(ifp, txr);
+ IGB_TX_UNLOCK(txr);
+ } else
+ taskqueue_enqueue(que->tq, &txr->txq_task);
return (err);
}
OpenPOWER on IntegriCloud