Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 22:19:41 -0800 (PST)
From:      Bill Paul <wpaul@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   cvs commit: src/sys/pci if_ax.c
Message-ID:  <199901160619.WAA17406@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       1999/01/15 22:19:40 PST

  Modified files:
    sys/pci              if_ax.c 
  Log:
  Fix some stability problems:
  
  - Normally, the driver allocates an mbuf cluster for each receive
    descriptor. This is because we have to be prepared to accomodate up to
    1500 bytes (a cluster buffer can hold up to 2K). However, using up a
    whole cluster buffer for a tiny packet is a bit of a waste. Also,
    it seems to me that sometimes mbufs will linger in the kernel for
    a while after being passed out of the driver, which means we might
    drain the mbuf cluster pool. The cluster pool is smaller than the
    mbuf pool in general, so we do the following: if the packet is less
    that MINCLSIZE bytes, then we copy it into a small mbuf chain and
    leave the mbuf cluster in place for another go-round. This saves
    mbuf clusters in some cases while still allowing them to be used
    for heavy traffic exchanges with lots of full-sized frames.
  
  - The transmit descriptor has a bit in the control word which allows
    the driver to request that a 'TX OK' interrupt be generated when
    a frame has been completed. Sometimes, a frame can be fragmented
    across several descriptors. The manual for the real DEC 21140A says
    that if this happens, the 'TX interrupt request' bit is only valid
    in the descriptor of the last fragment. With the ASIX chip, it seems
    the 'TX interrupt request' bit is only valid in the descriptor of
    the _first_ fragment. Actually, the manual contains conflicting
    information, but I think it's supposed to be the first fragment.
    To play it safe, set the bit in both the first and last fragment to
    be sure that we get a TX OK interrupt. Without this fix, the driver
    can sometimes be late in releasing mbufs from the transmit queue
    after transmission.
  
  Revision  Changes    Path
  1.2       +22 -9     src/sys/pci/if_ax.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



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