Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 17:53:35 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/bge if_bge.c if_bgereg.h
Message-ID:  <201006101754.o5AHs0aO048900@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
yongari     2010-06-10 17:53:35 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/dev/bge          if_bge.c if_bgereg.h 
  Log:
  SVN rev 208993 on 2010-06-10 17:53:35Z by yongari
  
  MFC r208862:
    Fix a bug introduced in r199011. When bge(4) reuses loaded RX
    buffers it should also reinitialize RX descriptors otherwise some
    stale data could be passed to controller. This could end up with
    mbuf double free or unexpected NULL pointer dereference in upper
    stack. To fix the issue, save loaded buffer's length and
    reinitialize RX descriptors with the saved value whenever bge(4)
    reuses the loaded RX buffers.
    While I'm here, increase the number of RX buffers to 512 from 256.
    This simplifies RX buffer handling as well as giving more RX
    buffers. Controller supports just fixed number of RX buffers
    (i.e. 512) and bge(4) used to rely on hope that our CPU is fast
    enough to keep up with the controller. With this change, bge(4)
    will use 1MB for RX buffers but I don't think it would cause
    problems in these days.
  
    Reported by:  marcel
    Tested by:    marcel
    Approved by:  re (bz)
  
  Revision    Changes    Path
  1.226.2.23  +49 -16    src/sys/dev/bge/if_bge.c
  1.83.2.12   +2 -0      src/sys/dev/bge/if_bgereg.h



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