Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Oct 2015 22:55:42 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290211 - head/sys/mips/atheros
Message-ID:  <201510302255.t9UMtghR095966@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Fri Oct 30 22:55:41 2015
New Revision: 290211
URL: https://svnweb.freebsd.org/changeset/base/290211

Log:
  arge: ensure there's enough space in the TX ring before attempting to
  send frames.
  
  This matches the other check for space.
  
  "enough" is a misnomer, for "reasons".  The biggest reason is that
  the TX ring is actually a circular linked list, with no head/tail pointers.
  This is just a bit more headroom between head/tail so we have time to
  schedule frames before we hit where the hardware is at.
  
  Ideally this would be tunable and a little larger.

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==============================================================================
--- head/sys/mips/atheros/if_arge.c	Fri Oct 30 22:53:30 2015	(r290210)
+++ head/sys/mips/atheros/if_arge.c	Fri Oct 30 22:55:41 2015	(r290211)
@@ -1501,7 +1501,7 @@ arge_encap(struct arge_softc *sc, struct
 	}
 
 	/* Check number of available descriptors. */
-	if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 1)) {
+	if (sc->arge_cdata.arge_tx_cnt + nsegs >= (ARGE_TX_RING_COUNT - 2)) {
 		bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap);
 		sc->stats.tx_pkts_nosegs++;
 		return (ENOBUFS);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510302255.t9UMtghR095966>