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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to