From owner-cvs-all@FreeBSD.ORG Mon Jun 4 06:01:05 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6383B16A400; Mon, 4 Jun 2007 06:01:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5614113C46A; Mon, 4 Jun 2007 06:01:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l54615aE069191; Mon, 4 Jun 2007 06:01:05 GMT (envelope-from yongari@repoman.freebsd.org) Received: (from yongari@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l54615lN069185; Mon, 4 Jun 2007 06:01:05 GMT (envelope-from yongari) Message-Id: <200706040601.l54615lN069185@repoman.freebsd.org> From: Pyun YongHyeon Date: Mon, 4 Jun 2007 06:01:04 +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/gem if_gem.c if_gemreg.h if_gemvar.h 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: Mon, 04 Jun 2007 06:01:05 -0000 yongari 2007-06-04 06:01:04 UTC FreeBSD src repository Modified files: sys/dev/gem if_gem.c if_gemreg.h if_gemvar.h Log: o Implemented Rx/Tx checksum offload. The simple checksum logic in GEMs is unable to discriminate UDP from TCP packets such that it can generate 0x0000 checksum value for the UDP datagram. So the UDP checksum offload was disabled by default. You can enable it by setting link0 flag with ifconfig(8). o bus_dma(9) clean up. It now correctly set number of required DMA segments/size and removed incorrect use of BUS_DMA_ALLOCNOW flag in static allocations done via bus_dmamem_alloc(9). o Implemented ALTQ(9) support. o Implemented Tx side bus_dmamap_load_mbuf_sg(9) which can remove several book keeping chores orginated from call-back mechanism. Therefore gem_txdma_callback() was removed and its functionality was reimplemented in gem_load_txmbuf(). o Don't set GEM_TD_START_OF_PACKET flag until all remaining mbuf chains are set. I think it was a long standing bug and it caused fluctuating interrupts/CPU usage patterns while netperf test is in progress. Previously it seems that we race with the device. Because I don't have a documentation for GEM I'm not sure this is correct but almost all other documentations I have stated this implications on setting SOP mark in descriptor ring(e.g. hme(4)). o Borrowed gem_defrag() from ath(4) which is supposed to be much faster than m_defrag(9) since it's not need to defrag all mbuf chains. o gem_load_txmbuf() was changed to allow passed mbuf chains to free. Caller of gem_load_txmbuf() correctly handles freed mbuf chains. o In gem_start_locked(), added checks for availability of Tx descriptors before trying to load DMA maps which could save CPU cycles when number of available descriptors are low. Also, simplyfy IFF_DRV_OACTIVE detection logic. o Removed hard-coded function names in CTR macros and replaced it with __func__. o Moved statistics counter register access to gem_tick() to reduce number of PCI bus accesses. There is no reason to update statistics counters in interrupt handler. o Removed unnecessary call of gem_start_locked() in gem_ioctl(). Reviewed by: grehan (initial version), marius (with improvements and suggestions) Tested by: grehan (ppc), marius(sparc64) Revision Changes Path 1.42 +417 -218 src/sys/dev/gem/if_gem.c 1.4 +2 -0 src/sys/dev/gem/if_gemreg.h 1.14 +1 -6 src/sys/dev/gem/if_gemvar.h