Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2012 10:43:35 +0200
From:      Fabien Thomas <fabien.thomas@netasq.com>
To:        Jack F Vogel <jfv@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r239105 - head/sys/dev/e1000
Message-ID:  <905F03BA-907F-4330-BF59-77F0A2DB1B02@netasq.com>
In-Reply-To: <201208062044.q76Ki59o081002@svn.freebsd.org>
References:  <201208062044.q76Ki59o081002@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_355BEF34-3FDC-4197-8401-CC7FF59FF36E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

>=20
> @@ -961,7 +961,15 @@ igb_mq_start(struct ifnet *ifp, struct m
> 	que =3D &adapter->queues[i];
> 	if (((txr->queue_status & IGB_QUEUE_DEPLETED) =3D=3D 0) &&
> 	    IGB_TX_TRYLOCK(txr)) {
> -		err =3D igb_mq_start_locked(ifp, txr, m);
> +		struct mbuf *pm =3D NULL;
> +		/*
> +		** Try to queue first to avoid
> +		** out-of-order delivery, but=20
> +		** settle for it if that fails
> +		*/
> +		if (m && drbr_enqueue(ifp, txr->br, m))
> +			pm =3D m;
> +		err =3D igb_mq_start_locked(ifp, txr, pm);
> 		IGB_TX_UNLOCK(txr);
> 	} else {

Why not just enqueue / start with NULL ?
err =3D 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 =3D drbr_enqueue(ifp, txr->br, m);
> @@ -981,7 +989,7 @@ igb_mq_start_locked(struct ifnet *ifp, s
> 	IGB_TX_LOCK_ASSERT(txr);
>=20
> 	if (((ifp->if_drv_flags & IFF_DRV_RUNNING) =3D=3D 0) ||
> -	    (txr->queue_status =3D=3D IGB_QUEUE_DEPLETED) ||
> +	    (txr->queue_status & IGB_QUEUE_DEPLETED) ||
> 	    adapter->link_active =3D=3D 0) {
> 		if (m !=3D NULL)
> 			err =3D drbr_enqueue(ifp, txr->br, m);


--Apple-Mail=_355BEF34-3FDC-4197-8401-CC7FF59FF36E--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?905F03BA-907F-4330-BF59-77F0A2DB1B02>