From owner-p4-projects@FreeBSD.ORG Mon Jun 2 09:29:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 203CA37B404; Mon, 2 Jun 2003 09:29:15 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C48D337B401 for ; Mon, 2 Jun 2003 09:29:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31E9443FA3 for ; Mon, 2 Jun 2003 09:29:14 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h52GTE0U066943 for ; Mon, 2 Jun 2003 09:29:14 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h52GTDAo066940 for perforce@freebsd.org; Mon, 2 Jun 2003 09:29:13 -0700 (PDT) Date: Mon, 2 Jun 2003 09:29:13 -0700 (PDT) Message-Id: <200306021629.h52GTDAo066940@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 32381 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 16:29:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=32381 Change 32381 by rwatson@rwatson_tislabs on 2003/06/02 09:28:57 Integrate change to how mbuf defragmentation occurs in if_fxp; this may resolve a bug involving m_tag chain corruption in the fxp driver, so give it a spin. Affected files ... .. //depot/projects/trustedbsd/base/sys/dev/fxp/if_fxp.c#25 integrate Differences ... ==== //depot/projects/trustedbsd/base/sys/dev/fxp/if_fxp.c#25 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.180 2003/05/25 05:04:26 truckman Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.181 2003/06/02 05:16:42 silby Exp $"); #include #include @@ -1396,24 +1396,13 @@ * mbuf chain first. Bail out if we can't get the * new buffers. */ - MGETHDR(mn, M_DONTWAIT, MT_DATA); + mn = m_defrag(mb_head, M_DONTWAIT); if (mn == NULL) { m_freem(mb_head); break; + } else { + mb_head = mn; } - if (mb_head->m_pkthdr.len > MHLEN) { - MCLGET(mn, M_DONTWAIT); - if ((mn->m_flags & M_EXT) == 0) { - m_freem(mn); - m_freem(mb_head); - break; - } - } - m_copydata(mb_head, 0, mb_head->m_pkthdr.len, - mtod(mn, caddr_t)); - mn->m_pkthdr.len = mn->m_len = mb_head->m_pkthdr.len; - m_freem(mb_head); - mb_head = mn; error = bus_dmamap_load_mbuf(sc->fxp_mtag, txp->tx_map, mb_head, fxp_dma_map_txbuf, sc, 0); if (error) {