From 83cef45266a49c82dcbb3a44c2321570d628778b Mon Sep 17 00:00:00 2001 From: Jack F Vogel Date: Tue, 13 Aug 2013 00:25:39 +0000 Subject: [PATCH] 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. --- sys/dev/e1000/if_igb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index 65f4205af6c..6887bcf3553 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); }