From owner-freebsd-net@FreeBSD.ORG Sat May 24 16:15:35 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E86301065677 for ; Sat, 24 May 2008 16:15:34 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A86658FC12 for ; Sat, 24 May 2008 16:15:34 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m4OGFXX8051806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 24 May 2008 09:15:34 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48383F25.2020309@freebsd.org> Date: Sat, 24 May 2008 09:15:33 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: mutex@unixtech.info References: <52090.74.56.88.177.1211525413.squirrel@webmail.unixtech.info> In-Reply-To: <52090.74.56.88.177.1211525413.squirrel@webmail.unixtech.info> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: freebsd-net@freebsd.org Subject: Re: Atheros 5212 network issues. 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, 24 May 2008 16:15:35 -0000 mutex@unixtech.info wrote: > Hello! > I am running FreeBSD 7.0 stable. I am having speed issues that I was > not experiencing before when I was running 6.3 stable. > > My wireless connection is now unstable and not as much consistent as it > was before. The wired connection is as usual ~7000kb/up and 800kb/down. > > Each test (~20 per day during 5 days) I did was on a 10 second interval, > speed is fluctuating from ~80kb to ~4000kb down and ~80kb to ~300kb up and > some tests return both download and upload to be very low. > > Also, one test can return 300kb down and 80kb up when next one 10 seconds > later returns 80kb down and 300kb up. > > Latency is fluctuating as well. > > I tried to use another channel, swap disk and wireless card to another > machine, cvsup and upgrade again. > > I didn't changed network settings, firewall rules, and my hostapd config. > > Here are some more informations on my hardware: > > FreeBSD 7.0-STABLE #0: Mon May 19 23:10:53 EDT 2008 > mutex@xxxxxxx:/usr/obj/usr/src/sys/MUTEX > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Intel(R) Celeron(R) CPU 1.70GHz (1716.91-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0xf13 Stepping = 3 > Features=0x3febfbff > real memory = 805240832 (767 MB) > avail memory = 774049792 (738 MB) > ACPI APIC Table: > ioapic0 irqs 0-23 on motherboard > wlan: mac acl policy registered > kbd1 at kbdmux0 > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) > acpi0: on motherboard > acpi0: [ITHREAD] > acpi0: Power Button (fixed) > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 > cpu0: on acpi0 > p4tcc0: on cpu0 > acpi_button0: on acpi0 > acpi_button1: on acpi0 > pcib0: port 0xcf8-0xcff,0x4000-0x40bf on acpi0 > pci0: on pcib0 > agp0: on hostb0 > pcib1: at device 1.0 on pci0 > pci1: on pcib1 > vgapci0: mem > 0xe0000000-0xe0ffffff,0xd8000000-0xdfffffff irq 16 at device 0.0 on pci1 > uhci0: port 0xd800-0xd81f irq > 16 at device 29.0 on pci0 > uhci0: [GIANT-LOCKED] > uhci0: [ITHREAD] > usb0: on uhci0 > usb0: USB revision 1.0 > uhub0: on usb0 > uhub0: 2 ports with 2 removable, self powered > uhci1: port 0xd000-0xd01f irq > 19 at device 29.1 on pci0 > uhci1: [GIANT-LOCKED] > uhci1: [ITHREAD] > usb1: on uhci1 > usb1: USB revision 1.0 > uhub1: on usb1 > uhub1: 2 ports with 2 removable, self powered > uhci2: port 0xd400-0xd41f irq > 18 at device 29.2 on pci0 > uhci2: [GIANT-LOCKED] > uhci2: [ITHREAD] > usb2: on uhci2 > usb2: USB revision 1.0 > uhub2: on usb2 > uhub2: 2 ports with 2 removable, self powered > ehci0: mem > 0xe4000000-0xe40003ff irq 23 at device 29.7 on pci0 > ehci0: [GIANT-LOCKED] > ehci0: [ITHREAD] > usb3: EHCI version 1.0 > usb3: companion controllers, 2 ports each: usb0 usb1 usb2 > usb3: on ehci0 > usb3: USB revision 2.0 > uhub3: on usb3 > uhub3: 6 ports with 6 removable, self powered > pcib2: at device 30.0 on pci0 > pci2: on pcib2 > fxp0: port 0xc000-0xc03f mem > 0xe3050000-0xe3050fff,0xe3020000-0xe303ffff irq 18 at device 0.0 on pci2 > miibus0: on fxp0 > inphy0: PHY 1 on miibus0 > inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > fxp0: Ethernet address: 00:02:b3:b6:af:59 > fxp0: [ITHREAD] > ath0: mem 0xe3040000-0xe304ffff irq 21 at device 1.0 on pci2 > ath0: [ITHREAD] > ath0: using obsoleted if_watchdog interface > ath0: Ethernet address: 00:14:a5:0d:c0:91 > ath0: mac 10.5 phy 6.1 radio 6.3 > fxp1: port 0xc400-0xc43f mem > 0xe3052000-0xe3052fff,0xe3000000-0xe301ffff irq 22 at device 2.0 on pci2 > miibus1: on fxp1 > inphy1: PHY 1 on miibus1 > inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > fxp1: Ethernet address: 00:02:b3:b6:af:09 > fxp1: [ITHREAD] > vr0: port 0xc800-0xc8ff mem > 0xe3051000-0xe30510ff irq 16 at device 3.0 on pci2 > vr0: Quirks: 0x0 > vr0: Revision: 0x43 > miibus2: on vr0 > ukphy0: PHY 8 on miibus2 > ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > vr0: Ethernet address: 00:50:ba:18:ff:5f > vr0: [ITHREAD] > isab0: at device 31.0 on pci0 > isa0: on isab0 > atapci0: port > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 > ata0: on atapci0 > ata0: [ITHREAD] > ata1: on atapci0 > ata1: [ITHREAD] > pci0: at device 31.3 (no driver attached) > pci0: at device 31.5 (no driver attached) > fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 > fdc0: [FILTER] > sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 > sio0: type 16550A > sio0: [FILTER] > sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 > sio1: type 16550A > sio1: [FILTER] > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > kbd0 at atkbd0 > atkbd0: [GIANT-LOCKED] > atkbd0: [ITHREAD] > pmtimer0 on isa0 > orm0: at iomem 0xc0000-0xcc7ff pnpid ORM0000 on isa0 > ppc0: at port 0x378-0x37f irq 7 on isa0 > ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode > ppbus0: on ppc0 > ppbus0: [ITHREAD] > plip0: on ppbus0 > lpt0: on ppbus0 > lpt0: Interrupt-driven port > ppi0: on ppbus0 > ppc0: [GIANT-LOCKED] > ppc0: [ITHREAD] > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=0x300> > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > Timecounter "TSC" frequency 1716911056 Hz quality 800 > Timecounters tick every 1.000 msec > ad1: 19073MB at ata0-slave UDMA100 > acd0: CDROM at ata1-master PIO4 > Trying to mount root from ufs:/dev/ad1s1a > > pciconf -lv | grep ath > ath0@pci0:2:1:0: class=0x020000 card=0x000c17f9 chip=0x001b168c > rev=0x01 hdr=0x00 > > athstats > 36879 data frames received > 50372 data frames transmit > 135 tx frames with an alternate rate > 3508 long on-chip tx retries > 286 tx failed 'cuz too many retries > 18M current transmit rate > 1496 tx management frames > 949 tx frames discarded prior to association > 7427 tx frames with no ack marked > 42411 tx frames with short preamble > 76570 rx failed 'cuz of bad CRC > 1980968 rx failed 'cuz of PHY err > 1762216 OFDM timing > 3 OFDM restart > 218713 CCK timing > 36 CCK restart > 117021 beacons transmitted > 420 periodic calibrations > 55 rssi of last ack > 29 avg recv rssi > -96 rx noise floor > 164 switched default/rx antenna > Antenna profile: > [1] tx 25569 rx 36157 > [2] tx 24598 rx 36925 > > ifconfig: > ath0: flags=8843 metric 0 mtu 2290 > ether 00:14:a5:0d:c0:91 > inet 10.0.3.1 netmask 0xffffff00 broadcast 10.0.3.255 > media: IEEE 802.11 Wireless Ethernet autoselect > (autoselect ) > status: associated > ssid mutex channel 1 (2412 Mhz 11g) bssid 00:14:a5:0d:c0:91 > authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit TKIP 3:128-bit > txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 > roam:rssi11g 7 roam:rate11g 5 protmode CTS burst dtimperiod 1 > > sysctl: > net.wlan.0.%parent: ath0 > debug.disablefullpath: 0 > hw.ath.hal.swba_backoff: 0 > hw.ath.hal.sw_brt: 10 > hw.ath.hal.dma_brt: 2 > hw.ath.hal.version: 0.9.20.3 > hw.ath.txbuf: 200 > hw.ath.rxbuf: 40 > hw.ath.regdomain: 0 > hw.ath.countrycode: 0 > hw.ath.xchanmode: 1 > hw.ath.outdoor: 1 > hw.ath.calibrate: 30 > user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin: > dev.npx.0.%desc: math processor > dev.ath.0.%desc: Atheros 5212 > dev.ath.0.%driver: ath > dev.ath.0.%location: slot=1 function=0 > dev.ath.0.%pnpinfo: vendor=0x168c device=0x001b subvendor=0x17f9 > subdevice=0x000c cl > ass=0x020000 > dev.ath.0.%parent: pci2 > dev.ath.0.smoothing_rate: 95 > dev.ath.0.sample_rate: 10 > dev.ath.0.countrycode: 0 > dev.ath.0.regdomain: 16 > dev.ath.0.slottime: 9 > dev.ath.0.acktimeout: 48 > dev.ath.0.ctstimeout: 48 > dev.ath.0.softled: 0 > dev.ath.0.ledpin: 0 > dev.ath.0.ledon: 0 > dev.ath.0.ledidle: 2700 > dev.ath.0.txantenna: 0 > dev.ath.0.rxantenna: 2 > dev.ath.0.diversity: 0 > dev.ath.0.txintrperiod: 5 > dev.ath.0.diag: 0 > dev.ath.0.tpscale: 0 > dev.ath.0.tpc: 0 > dev.ath.0.tpack: 63 > dev.ath.0.tpcts: 63 > dev.ath.0.fftxqmin: 2 > dev.ath.0.fftxqmax: 50 > dev.ath.0.monpass: 24 > > /etc/sysctl.conf *I didn't changed any other sysctl option* > net.inet.ip.forwarding=1 > > Lines added to Generic kernel: > > # PF > device pf > device pflog > device pfsync > > # ALTQ > options ALTQ > options ALTQ_CBQ # Class Bases Queuing (CBQ) > options ALTQ_RED # Random Early Detection (RED) > options ALTQ_RIO # RED In/Out > options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) > options ALTQ_PRIQ # Priority Queuing (PRIQ) > options ALTQ_NOPCC # Required for SMP build > > > Please help me troubleshoot and resolve this issue. > > Simplify your configuration. First remove ALTQ and any packet processing in the tx/rx paths (e.g. pf). If that doesn't resolve the issues you are seeing try to isolate the problem to rx or tx by running unidirectional tests. Finally, if this is related to tx rate control then fix the tx rate to eliminate that variable. If you cannot resolve the issue please file a PR. Be sure to provide sufficient information for someone to exactly duplicate your setup. Sam