Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 01:50:54 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/em if_em.c if_em.h
Message-ID:  <200608140150.k7E1osuf005683@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
yongari     2006-08-14 01:50:54 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/em           if_em.c if_em.h 
  Log:
  Overhaul Rx path to recover from mbuf cluster allocation failure.
   o Create one more spare DMA map for Rx handler to recover from
     bus_dmamap_load_mbuf_sg(9) failure.
   o Make sure to update status bit in Rx descriptors even if we failed
     to allocate a new buffer. Previously it resulted in stuck condition
     and em_handle_rxtx task took up all available CPU cycles.
   o Don't blindly unload DMA map. Reuse loaded DMA map if received
     packet has errors. This would speed up Rx processing a bit under
     heavy load as it does not need to reload DMA map in case of error.
     (bus_dmamap_load_mbuf_sg(9) is the most expensive call in driver
      context.)
   o Update if_iqdrops counter if it can't allocate a mbuf cluster.
     With this change it's now possible to see queue dropped packets
     with netstat(1).
   o Update mbuf_cluster_failed counter if fixup code failed to
     allocate mbuf header.
   o Return ENOBUFS instead of ENOMEM in case of Rx fixup failure.
   o Make adapter->lmp NULL in case of Rx fixup failure. Strictly
     specking it's not necessary for correct operation but it makes
     the intention clear.
   o Remove now unused dropped_pkts member in softc.
  
  With these changes em(4) should survive mbuf cluster allocation
  failure on Rx path.
  
  Reviewed by:    pdeuskar, glebius (with improvements)
  
  Revision  Changes    Path
  1.129     +68 -47    src/sys/dev/em/if_em.c
  1.48      +1 -1      src/sys/dev/em/if_em.h



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