From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Guinot Subject: Re: [PATCH] net: mvneta: fix handling of the Tx descriptor counter Date: Mon, 13 Nov 2017 15:51:15 +0100 Message-ID: <20171113145115.GM18407@kw.sim.vm.gnt> References: <20171108165835.13453-1-simon.guinot@sequanux.org> <20171111.184504.2151388779461931723.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SqfawxHnX56H7Ukl" Cc: thomas.petazzoni@free-electrons.com, netdev@vger.kernel.org, musv@gmx.de, andreas.tobler@cloudguard.ch, gregory.clement@free-electrons.com, antoine.tenart@free-electrons.com, mw@semihalf.com, stable@vger.kernel.org To: David Miller Return-path: Content-Disposition: inline In-Reply-To: <20171111.184504.2151388779461931723.davem@davemloft.net> Sender: stable-owner@vger.kernel.org List-Id: netdev.vger.kernel.org --SqfawxHnX56H7Ukl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 11, 2017 at 06:45:04PM +0900, David Miller wrote: > From: Simon Guinot > Date: Wed, 8 Nov 2017 17:58:35 +0100 >=20 > > @@ -2413,8 +2416,7 @@ static int mvneta_tx(struct sk_buff *skb, struct = net_device *dev) > > if (txq->count >=3D txq->tx_stop_threshold) > > netif_tx_stop_queue(nq); > > =20 > > - if (!skb->xmit_more || netif_xmit_stopped(nq) || > > - txq->pending + frags > MVNETA_TXQ_DEC_SENT_MASK) > > + if (!skb->xmit_more || netif_xmit_stopped(nq)) > > mvneta_txq_pend_desc_add(pp, txq, frags); > > else > > txq->pending +=3D frags; >=20 > As David Laight said, you should not allow unlimited amounts of > ->xmit_more frames to be queued without a TX doorbell update. >=20 > Therefore, please keep some kind of limit here otherwise latency > will spike in some circumstances. Hi David, IIUC the driver stops the queue if a threshold of 316 Tx descriptors is reached (default and worst value). Is that a "good enough" kind of limit ? Or do you want me to keep the condition above ? Simon --SqfawxHnX56H7Ukl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAloJsWMACgkQgtp0PDeOcDpUdACbBGnF3W7Jzpk0YMDG2LFaYh0X cUsAoJk5SNdH6M2EDRVWN4/NXj4MKtsX =elwY -----END PGP SIGNATURE----- --SqfawxHnX56H7Ukl--