Date: Fri, 29 Sep 2006 13:12:38 +0000 (UTC) From: Andre Oppermann <andre@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 Message-ID: <200609291312.k8TDCdsM077350@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609291312.k8TDCdsM077350>
