Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2010 21:55:44 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/vge if_vge.c if_vgereg.h if_vgevar.h
Message-ID:  <201001082155.o08Lttsk035649@repoman.freebsd.org>

index | next in thread | raw e-mail

yongari     2010-01-08 21:55:44 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/dev/vge          if_vge.c if_vgereg.h if_vgevar.h 
  Log:
  SVN rev 201834 on 2010-01-08 21:55:44Z by yongari
  
  MFC r200525:
    Overhaul bus_dma(9) usage and fix various things.
     o Separate TX/RX buffer DMA tag from TX/RX descriptor ring DMA tag.
     o Separate RX buffer DMA tag from common buffer DMA tag. RX DMA
       tag has different restriction compared to TX DMA tag.
     o Add 40bit DMA address support.
     o Adjust TX/RX descriptor ring alignment to 64 bytes from 256
       bytes as documented in datasheet.
     o Added check to ensure TX/RX ring reside within a 4GB boundary.
       Since TX/RX ring shares the same high address register they
       should have the same high address.
     o TX/RX side bus_dmamap_load_mbuf_sg(9) support.
     o Add lock assertion to vge_setmulti().
     o Add RX spare DMA map to recover from DMA map load failure.
     o Add optimized RX buffer handler, vge_discard_rxbuf which is
       activated when vge(4) sees bad frames.
     o Don't blindly update VGE_RXDESC_RESIDUECNT register. Datasheet
       says the register should be updated only when number of
       available RX descriptors are multiple of 4.
     o Use __NO_STRICT_ALIGNMENT instead of defining VGE_FIXUP_RX which
       is only set for i386 architecture. Previously vge(4) also
       performed expensive copy operation to align IP header on amd64.
       This change should give RX performance boost on amd64
       architecture.
     o Don't reinitialize controller if driver is already running. This
       should reduce number of link state flipping.
     o Since vge(4) drops a driver lock before passing received frame
       to upper layer, make sure vge(4) is still running after
       re-acquiring driver lock.
     o Add second argument count to vge_rxeof(). The argument will
       limit number of packets could be processed in RX handler.
     o Rearrange vge_rxeof() not to allocate RX buffer if received
       frame was bad packet.
     o Removed if_printf that prints DMA map failure. This type of
       message shouldn't be used in fast path of driver.
     o Reduce number of allowed TX buffer fragments to 6 from 7. A TX
       descriptor allows 7 fragments of a frame. However the CMZ field
       of descriptor has just 3bits and the controller wants to see
       fragment + 1 in the field. So if we have 7 fragments the field
       value would be 0 which seems to cause unexpected results under
       certain conditions. This change should fix occasional TX hang
       observed on vge(4).
     o Simplify vge_stat_locked() and add number of available TX
       descriptor check.
     o vge(4) controllers lack padding short frames. Make sure to fill
       zero for the padded bytes. This closes unintended information
       disclosure.
     o Don't set VGE_TDCTL_JUMBO flag. Datasheet is not clear whether
       this bit should be set by driver or write-back status bit after
       transmission. At least vendor's driver does not set this bit so
       remove it. Without this bit vge(4) still can send jumbo frames.
     o Don't start driver when vge(4) know there are not enough RX
       buffers.
     o Remove volatile keyword in RX descriptor structure. This should
       be handled by bus_dma(9).
     o Collapse two 16bits member of TX/RX descriptor into single 32bits
       member.
     o Reduce number of RX descriptors to 252 from 256. The
       VGE_RXDESCNUM is 16bits register but only lower 8bits are valid.
       So the maximum number of RX descriptors would be 255. However
       the number of should be multiple of 4 as controller wants to
       update 4 RX descriptors at a time. This limits the maximum
       number of RX descriptor to be 252.
  
  PR:     kern/141276, kern/141414
  
  Revision  Changes    Path
  1.31.2.5  +769 -648  src/sys/dev/vge/if_vge.c
  1.2.10.1  +7 -9      src/sys/dev/vge/if_vgereg.h
  1.4.10.2  +75 -46    src/sys/dev/vge/if_vgevar.h


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001082155.o08Lttsk035649>