Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2006 02:40:08 +0800
From:      Thinker <thinker@branda.to>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/105580: bochs ne2k module was broken in FreeBSD
Message-ID:  <455B5F08.2040001@branda.to>
Resent-Message-ID: <200611151850.kAFIo21X029891@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         105580
>Category:       ports
>Synopsis:       bochs ne2k module was broken in FreeBSD
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 15 18:50:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     User &
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Thinker
>Environment:
System: FreeBSD seeker.branda.to 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Fri
Nov 10 01:50:04 CST 2006
thinker@seeker.branda.to:/usr/src/sys/i386/compile/seeker i386



>Description:
If you use ne2k driver for FreeBSD, bochs will not receive incoming packets
untill the buffer specified by bochs is full (2048). It cause connections
timeout in low traffic condition. Client OS think it losts packets, but it
actually in a BPF buffer waiting for receive.

>How-To-Repeat:
Run bochs on FreeBSD with it's fbsd ne2k module.

>Fix:

apply following patch.


--- patch-iodev::eth_fbsd.cc begins here ---
--- iodev/eth_fbsd.cc.orig Wed Nov 15 23:57:57 2006
+++ iodev/eth_fbsd.cc Wed Nov 15 23:59:04 2006
@@ -227,6 +227,14 @@
return;
}

+ v = 1;
+ if (ioctl(this->bpf_fd, BIOCIMMEDIATE, &v) < 0) {
+ BX_PANIC(("eth_freebsd: could not enable immediate mode"));
+ close(this->bpf_fd);
+ this->bpf_fd = -1;
+ return;
+ }
+
// Set up non-blocking i/o
v = 1;
if (ioctl(this->bpf_fd, FIONBIO, &v) < 0) {
--- patch-iodev::eth_fbsd.cc ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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