From owner-cvs-all@FreeBSD.ORG Tue Jan 15 01:37:11 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D056616A419; Tue, 15 Jan 2008 01:37:11 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta4.srv.hcvlny.cv.net (mta4.srv.hcvlny.cv.net [167.206.4.199]) by mx1.freebsd.org (Postfix) with ESMTP id 983D713C458; Tue, 15 Jan 2008 01:37:11 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from flosoft.no-ip.biz (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta4.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0JUN00FUMWHYPM90@mta4.srv.hcvlny.cv.net>; Mon, 14 Jan 2008 20:37:11 -0500 (EST) Received: from flosoft.no-ip.biz (localhost [IPv6:::1]) by flosoft.no-ip.biz (8.14.2/8.14.2) with ESMTP id m0F1b92j000425; Mon, 14 Jan 2008 20:37:10 -0500 Date: Mon, 14 Jan 2008 20:37:09 -0500 From: "Aryeh M. Friedman" In-reply-to: <200801150110.m0F1AVlA001255@repoman.freebsd.org> To: Pyun YongHyeon Message-id: <478C0E45.4030300@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.5 References: <200801150110.m0F1AVlA001255@repoman.freebsd.org> User-Agent: Thunderbird 2.0.0.9 (X11/20080104) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/pci if_rlreg.h src/sys/dev/re if_re.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2008 01:37:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is this equiv to the cumulative patch on your site? Pyun YongHyeon wrote: > yongari 2008-01-15 01:10:31 UTC > > FreeBSD src repository > > Modified files: sys/pci if_rlreg.h sys/dev/re > if_re.c Log: Overhaul re(4). o Increased number of Rx/Tx > descriptors to 256 for 8169 GigEs because it's hard to push the > hardware to the limit with default 64 descriptors. TSO requires > large number of Tx descriptors to pass a full sized TCP > segment(65535 bytes IP packet) to hardware. Previously it consumed > 32 Tx descriptors, assuming MCLBYTES DMA segment size, to send the > TCP segment which means re(4) couldn't queue more than two full > sized IP packets. For 8139C+ it still uses 64 Rx/Tx descriptors due > to its hardware limitations. With this changes there are (very) > small waste of memory for 8139C+ users but I don't think it would > affect 8139C+ users for most cases. o Various bus_dma(9) fixes. - > The hardware supports DAC so allow 64bit DMA operations. - Removed > BUS_DMA_ALLOC_NOW flag. - Increased DMA segment size to 4096 from > MCLBYTES because TSO consumes too many descriptors with MCLBYTES > DMA segment size. - Tx/Rx side bus_dmamap_load_mbuf_sg(9) support. > With these changes the code is more readable than previous one and > got a (slightly) better performance as it doesn't need to pass/ > decode arguments to/from callback function. - Removed unnecessary > callback function re_dmamap_desc() and nuked rl_dmaload_arg > structure which was used in the callback. - Additional protection > for DMA map load failure. In case of failure reuse current map > instead of returning a bogus DMA map. - Deferred DMA map > unloading/sync operation for maximum performance until we really > need to load new DMA map. If we happen to reuse current map(e.g. > input error) there is no need to sync/unload/load again. - The > number of allowable Tx DMA segments for a mbuf chains are now 32 > instead of magic nseg value. If the number of available Tx > descriptors are short enough to send highly fragmented mbuf chains > an optimized re_defrag() is called to collapse mbuf chains which is > supposed to be much faster than m_defrag(9). re_defrag() was > borrowed from ath(4). - Separated Rx/Tx DMA tag from a common DMA > tag such that Rx DMA tag correctly uses DMA maps that were created > with DMA alignment restriction(8bytes alignments). Tx DMA tag does > not have such alignment limitation. - Added additional sanity > checks for DMA ring map load failure. - Added additional spare Rx > DMA map for graceful handling of Rx DMA map load failure. - Fixed > misused bus_dmamap_sync(9) and added missing bus_dmamap_sync(9) in > re_encap()/re_txeof()/re_rxeof(). o Enabled TSO again as re(4) have > reasonable number of Tx descriptors. o Don't touch DMA address of a > Tx descriptor in re_txeof(). It's not needed. o Fix incorrect > update of if_ierrors counter. For Rx buffer shortage it should > update if_qdrops as the buffer is reused. o Added checks for > unsupported H/W revisions and return ENXIO for these hardwares. > This is required to remove resource allocation code in re_probe as > other drivers do in device probe routine. o Modified descriptor > index manipulation macros as it's now possible to have different > number of descriptors for Rx/Tx. o In re_start, to save a lock > operation, use IFQ_DRV_IS_EMPTY before trying to invoke > IFQ_DRV_DEQUEUE. Also don't blindly call re_encap since we already > know the number of available Tx descriptors in advance. o Removed > RL_TX_DESC_THLD which was used to reserve RL_TX_DESC_THLD > descriptors in Tx path. There is no such a limitation mentioned in > 8139C+/8169/8110/8168/8101/8111 datasheet and it seems to work ok > without reserving RL_TX_DESC_THLD descriptors. o Fix a comment for > RL_GTXSTART. The register is 8bits register. o Added comments for > 8169/8139C+ hardware restrictions on descriptors. o Removed forward > declaration for "struct rl_softc", it's not needed. o Added a new > structure rl_txdesc for Tx descriptor managements and a structure > rl_rxdesc for Rx descriptor managements. o Removed unused member > variable rl_intlock in driver softc. There are still several unused > member variables which are supposed to be used to access hardware > statistics counters. But it seems that accessing hardware counters > were not implemented yet. > > Revision Changes Path 1.101 +483 -359 > src/sys/dev/re/if_re.c 1.70 +37 -23 src/sys/pci/if_rlreg.h > _______________________________________________ cvs-src@freebsd.org > mailing list http://lists.freebsd.org/mailman/listinfo/cvs-src To > unsubscribe, send any mail to "cvs-src-unsubscribe@freebsd.org" > - -- Aryeh M. Friedman FloSoft Systems, Java Developer Tools. http://www.flosoft-systems.com Developer, not business, friendly. "Free software != Free beer" Blog: http://www.flosoft-systems.com/flosoft_systems_community/blogs/aryeh/index.php -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHjA5FjRvRjGmHRgQRAm2fAJ9ws2xyHRh7gnAoNJh2nwKzhU3LhQCgod/G lfdLHycwMHg3dknfOun+cqs= =PkUT -----END PGP SIGNATURE-----