From owner-cvs-src@FreeBSD.ORG Thu Nov 16 04:04:08 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C96816A403; Thu, 16 Nov 2006 04:04:08 +0000 (UTC) (envelope-from jdp@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C01B43D55; Thu, 16 Nov 2006 04:04:08 +0000 (GMT) (envelope-from jdp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG447pg066619; Thu, 16 Nov 2006 04:04:07 GMT (envelope-from jdp@repoman.freebsd.org) Received: (from jdp@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG447gi066614; Thu, 16 Nov 2006 04:04:07 GMT (envelope-from jdp) Message-Id: <200611160404.kAG447gi066614@repoman.freebsd.org> From: John Polstra Date: Thu, 16 Nov 2006 04:04:07 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/bce if_bce.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 04:04:08 -0000 jdp 2006-11-16 04:04:07 UTC FreeBSD src repository Modified files: sys/dev/bce if_bce.c Log: In bce_start_locked, check the used_tx_bd count rather than the descriptor's mbuf pointer to see if the transmit ring is full. The mbuf pointer is set only in the last descriptor of a multi-descriptor packet. By relying on the mbuf pointers of the earlier descriptors, the driver would sometimes overwrite a descriptor belonging to a packet that wasn't completed yet. Also, tx_chain_prod wasn't updated inside the loop, causing the wrong descriptor to be checked after the first iteration. The upshot of all this was the loss of some transmitted packets at medium to high packet rates. In bce_tx_encap, remove a couple of old statements that shuffled around the tx_mbuf_map pointers. These now correspond 1-to-1 with the transmit descriptors, and they are not supposed to be changed. Correct a couple of inaccurate comments. MFC after: 1 month Revision Changes Path 1.20 +8 -8 src/sys/dev/bce/if_bce.c