svn commit: r239105 - head/sys/dev/e1000
Fabien Thomas
fabien.thomas at netasq.com
Tue Aug 7 08:43:38 UTC 2012
>
> @@ -961,7 +961,15 @@ igb_mq_start(struct ifnet *ifp, struct m
> que = &adapter->queues[i];
> if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) &&
> IGB_TX_TRYLOCK(txr)) {
> - err = igb_mq_start_locked(ifp, txr, m);
> + struct mbuf *pm = NULL;
> + /*
> + ** Try to queue first to avoid
> + ** out-of-order delivery, but
> + ** settle for it if that fails
> + */
> + if (m && drbr_enqueue(ifp, txr->br, m))
> + pm = m;
> + err = igb_mq_start_locked(ifp, txr, pm);
> IGB_TX_UNLOCK(txr);
> } else {
Why not just enqueue / start with NULL ?
err = drbr_enqueue(ifp, txr->br, m);
igb_mq_start_locked(ifp, txr, NULL);
It seems that in case the queue is full you will send out of order with the current patch.
> err = drbr_enqueue(ifp, txr->br, m);
> @@ -981,7 +989,7 @@ igb_mq_start_locked(struct ifnet *ifp, s
> IGB_TX_LOCK_ASSERT(txr);
>
> if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) ||
> - (txr->queue_status == IGB_QUEUE_DEPLETED) ||
> + (txr->queue_status & IGB_QUEUE_DEPLETED) ||
> adapter->link_active == 0) {
> if (m != NULL)
> err = drbr_enqueue(ifp, txr->br, m);
More information about the svn-src-all
mailing list