cvs commit: src/sys/dev/em if_em.c

Andre Oppermann andre at FreeBSD.org
Fri Sep 29 06:12:40 PDT 2006


andre       2006-09-29 13:12:38 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/em           if_em.c 
  Log:
  Handle all error cases from bus_dmamap_load_mbuf_sg().  Those are:
  
   - EFBIG means the mbuf chain was too long and bus_dma ran out of segments.
     Defragment the mbuf chain and try again. (Already existed, not changed.)
   - ENOMEM means bus_dma could not obtain enough bounce buffers at this point
     in time.  Defer sending and try again later.
   - All other errors, in particular EINVAL, are fatal and prevent the mbuf
     chain from ever going through.  Drop it and report error.
   - Checking (nsegs == 0) is unnecessary as bus_dmamap_load_mbuf_sg() always
     reports an error if it is < 1.
  
  This prevents broken packets from clogging the interface queue indefinately.
  
  Discussed with: scottl
  Reviewed by:    jfv
  
  Revision  Changes    Path
  1.148     +21 -5     src/sys/dev/em/if_em.c


More information about the cvs-all mailing list