From owner-cvs-all Fri Jan 15 22:19:42 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA10101 for cvs-all-outgoing; Fri, 15 Jan 1999 22:19:42 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA10096; Fri, 15 Jan 1999 22:19:41 -0800 (PST) (envelope-from wpaul@FreeBSD.org) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id WAA17406; Fri, 15 Jan 1999 22:19:41 -0800 (PST) Date: Fri, 15 Jan 1999 22:19:41 -0800 (PST) Message-Id: <199901160619.WAA17406@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/pci if_ax.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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