[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: Mark Kettenis <kettenis_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Tue, 26 Aug 2008 15:06:29 -0600 (MDT)
CVSROOT: /cvs
Module name: src
Changes by: kettenis_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org 2008/08/26 15:06:29
Modified files:
sys/dev/ic : gem.c
Log message:
Fix a couple of problems that may make gem(4) get stuck:
1. If bus_dmamap_load_mbuf() fails because there are not enough
segments in the map, defrag the mbuf.
2. If there are not enough free (hardware ring) descriptors, set
IFF_OACTIVE and keep the packet on the queue.
3. If there is some other resource starvation that makes
bus_dmamap_load_mbuf() or defragmentation fail, drop the packet.
Don't set IFF_OACTIVE, since the Tx ring could be empty and we'd be
stuck.
4. Only pass packets that are actually handed off to the hardware to
BPF. Do so before handing them off to the hardware to make sure
the packet isn't freed behind our back.
ok dlg@
Visit your host, monkey.org