From owner-freebsd-net@FreeBSD.ORG Sat Dec 17 18:59:37 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A09AC16A41F for ; Sat, 17 Dec 2005 18:59:37 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id C85D343D90 for ; Sat, 17 Dec 2005 18:59:25 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.192] ([10.0.0.192]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id jBHIxNA8024439 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 17 Dec 2005 10:59:25 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <43A45FCE.50603@errno.com> Date: Sat, 17 Dec 2005 10:58:22 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: nielsen@memberwebs.com References: <20051215165651.DF16670DDA6@mail.npubs.com> <43A1C208.5030309@errno.com> <20051216231843.7706370DD6F@mail.npubs.com> In-Reply-To: <20051216231843.7706370DD6F@mail.npubs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Bridging atheros/ethernet seems incredibly slow X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Dec 2005 18:59:37 -0000 Nate Nielsen wrote: > Sam Leffler wrote: > >>adhoc mode is not intended for bridging; I'm a bit surprised it works at >>all (I've never tried it). > > > Perhaps not in the atheros driver, or net80211 subsystem. The atheros driver is irrelevant, it's just a packet pusher. > > But general it does make sense. I'm setting up several point to point > links with relays. The plan is that these relays bridge two freebsd > boxes with a radio in each one. You are describing a WDS link which is not implemented with adhoc mode. > > There seems to be very poor interaction between the bridging code and > the FreeBSD 802.11 subsystem. Perhaps because they're both on layer 2. As I said before, Andrew Atrens did this exercise. The bridge code puts the interface in promiscuous mode and this causes excess traffic due to packets being reflected. > > >>There are special hacks in >>ieee80211_deliver_data specific to hostap. > > > Yes, when I switched the bridging box to hostap mode, the bridge works > at a decent rate (10+ Mbps). > > However when I add the second hop in, performance is once again crap > (500Kbps to 1Mbps). The setup looks like this (where '-' is ethernet, > and '+' is wireless): You've again put the interface in promiscious mode. You will need to augment the net80211 layer to suppress certain traffic. People have done this before; try searching with google. > > The Relay > ----- BOX A ++++++++ BOX B -- BOX C +++++++++ BOX D ----- > Bridged with Ethernet > > BOX B and BOX C are in hostap mode. In the above setup BOX A has fast > throughput to BOX C, and BOX B has equally fast throughput to BOX D. > However BOX A to BOX D is slow. > > Unless there's a simple fix (no pressure), I think I'm giving up on > bridging the relay points. I'll be routing instead, even though that > brings strange multicast problems (which I'll post about seperately). > The code to do this is in the multi-bss vap project I did earlier this year. Unfortunately, as I've said repeatedly, it will not come into freebsd until there are developers committed to handling updating the wireless drivers. > >>>Doing a flood ping from BOX A to a machine bridged across the link is >>>not lossy, instead the send rate is limited. That is, the ping packets >>>are sent slowly. > > > This is also the case over two bridges. > > >>>>13 tx management frames >>>>7 tx frames discarded prior to association >>>>544 tx failed 'cuz too many retries >>>>6014 long on-chip tx retries >>>>876 tx frames with no ack marked >>>>1952 rx failed 'cuz frame too short >>>>5129 rx failed 'cuz of PHY err >>>> 1524 OFDM timing >>>> 3605 OFDM illegal rate >>>>1 beacons transmitted >>>>91 periodic calibrations >>>>rssi of last ack: 36 >>>>avg recv rssi: 38 >>>>1 switched default/rx antenna >>>>Antenna profile: >>>>[1] tx 1192 rx 18513 >>>>[2] tx 68 rx 1 >> >>These are not the stats you want :) > > > I thought (obviously wrongly) the 'OFDM illegal rate' may have something > to do with it. > > >>Look at the 802.11 layer. FWIW I >>recently reorgnized the tools and renamed them so the program you want >>is now called wlanstats and is found in tools/tools/net80211. > > > I'm using FreeBSD 6.0. Here's the output of 80211stats on the bridge. > This is when running in adhoc mode. (ie: BOX B above): > > 5 rx from wrong bssid > 770 rx discard 'cuz dup > 5617 rx beacon frames > 3 active scans started > 2 nodes timed out inactivity > > And on the peer (ie: BOX A above): > > 3015 rx discard 'cuz dup > 6017 rx beacon frames > 3 active scans started > 2 nodes timed out inactivity > > Cheers, > Nate > >