From owner-freebsd-emulation@FreeBSD.ORG Sat Apr 16 20:27:17 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BC2D106567C for ; Sat, 16 Apr 2011 20:27:17 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id DA26E8FC1D for ; Sat, 16 Apr 2011 20:27:16 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p3GKREUx021785 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 16 Apr 2011 13:27:15 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4DA9FBCE.2060106@freebsd.org> Date: Sat, 16 Apr 2011 13:27:58 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-emulation@freebsd.org References: <20110416120030.457A510656DF@hub.freebsd.org> In-Reply-To: <20110416120030.457A510656DF@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Networking frame loss in transmission X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 20:27:17 -0000 > Message: 2 > Date: Fri, 15 Apr 2011 18:57:19 -0500 > From: Alex Anagnos > Subject: Networking frame loss in transmission > To: freebsd-emulation@freebsd.org > Message-ID: > Content-Type: text/plain; charset=ISO-8859-1 > > FreeBSD 8.0-RELEASE w/ VirtualBox 3.2.12. > > The setup is a small application in a Guest OS that is sending UDP > Ethernet frames. > I Am capturing on FreeBSD on the device with both Wireshark, and a > custom written program that uses BPF zero copy. > > What i'm seeing is that when the application send data that is beyond > the MTU the data is fragmented. > However, sometimes, the first few fragments never show up in the > capture, and indeed the receiving app never gets the message > (reassembly fails). maybe it was waiting for arp? > So when I call send with an 8192 payload, i see, frames 1 and 2 go > missing, but 3, 4, and , 5 get out fine. (1500 MTU) do you see an arp reply wbetween 2 and 3? > When calling send 2 times in rapid succession, all fragments of the > first send go missing as well as 1, and 2 of the 2nd send. 3, 4, and 5 > get out fine. > When calling send 3 times in rapid succession, all fragments of send 1 > & 2 get lost as well as fragment 1& 2 of the 3rd send. Frags 3, 4, > and 5 are fine. makes arp less likely but not impossible. > When sending this at like 1 Message per second, things occasionally don't work. > When going at 3000FPS, it has so far always been the first few frames, > after that the rest of the stream gets through ok almost like the > driver has to warm up or something.. > > The issue happens sending from both a Linux guest and from a Windows Guest. > The issue does not care about the speed of the traffic, it happens at > 1FPS and at 3000FPS. have you tried a freebsd guest? at least we can debug that.. :-) > The issue does seam to occur less often the smaller the message sent. > When the message does not require fragmentation I have not seen the > issue happen but i'm not going to guarantee it does not happen. > > The problem happens using Bridged, VDE, and Host-Only. > The problem happens using the FastPCI driver, intel e1000, and para-virtualized. > The problem happens with any number of the above 3 combos. > > The problem happens in Version 3.2.6 and inversion 3.2.12. > > The problem looks to be somewhere in the VirtualBox box code, or maybe > in the VirtualBox kernel module integration with FreeBSD