Re: CFT: sf(4)



On Wed, Jan 02, 2008 at 12:39:39PM +0900, To freebsd-current@xxxxxxxxxxx wrote:
Hi,

I had been using the following overhauled sf(4) for serveral months
without issues. It would be really great sf(4) users can test the
driver and report back how it works on his/her box. Basically the
driver does the following thing.
- bus_dma(9) conversion and endianness support : Now sf(4) should
work on all architectures that FreeBSD runs.
- Performance optimization : switch to type 2 Tx descriptor and
removed lots of PCI register access. Rx alignment fixup is only
called on strict-alignment architectures so i386/amd64 would
get instant Rx performance boost.
- AIC-6915 supports Rx/Tx checksum offload as well as hardware VLAN
tag insertion/stripping if firmware is loaded into frame
processor. Unfortunately the firmware is not available under BSD
license so these additional hardware accelerations are not
available yet on FreeBSD. :-(
- Code cleanup & misc bug fixes.


A couple of days ago brueffer@ sent me a Starfire firmware. He said
gibbs@ sent him the firmware but checksum offload capability was not
added into driver at that time. So I took the firmware and wrote a
download routine from the information in datasheet. But the firmware
had a bug that prevents hardware from computing Tx checksumm.
Fortunately, I managed to analyze the bug and fixed it by hand. :-)

I've updated the overhauled sf(4) to use the firmware and fixed
several minor bugs in it. If there are no objections I'll commit it
in two weeks. The overhauled sf(4) has two sysctl variables not
present in stock version.

dev.sf.N.stats : N indicates instance number of driver.
With 'sysctl dev.sf.0.stats=1' command, you can see lots of useful
counters maintained by driver. Most counters are 32bit value but
number of Tx/Rx frames/octets and Rx bytes associated with packet
length are 64bit value.

dev.sf.N.int_mod : N indicates instance number of driver.
This controls how long sf(4) delays interrupt processing. Accepted
range is 0 to 31. Actual interrupt delay time is comuted by the
following expression.
delay = dev.sf.N.int_mod * 102.4us
The default value is 1(e.g. 102.4us). 0 completely disables the
interrupt modertation.

Install:

http://people.freebsd.org/~yongari/sf/if_sf.c
http://people.freebsd.org/~yongari/sf/if_sfreg.h
http://people.freebsd.org/~yongari/sf/starfire_rx.h
http://people.freebsd.org/~yongari/sf/starfire_tx.h

Download and copy the above files to /usr/src/sys/pci directory and
rebuild sf(4). Because I removed unnecessary copy operation in Rx
path you should see instant performance boost on i386/amd64. sparc64
still need the copy operation, though. If you find any regression
please let me know.

Thank you!

--
Regards,
Pyun YongHyeon
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • PATCH: fix multiple eMagic 6|2m regressions introduced in 2.6.27
    ... The eMagic driver code cleanup from 2.6.26->2.6.27 introduces three ... Bug 1: a mirror of the loop termination bug that was fixed in the 2|6 ... the firmware load loop that is supposed to load the firmware ... firmware header and pasted onto the other firmware file. ...
    (Linux-Kernel)
  • Re: [PATCH][2.6][2/14] documentation update
    ... add udev.txt which describes how to use dvb and udev/sysfs ... The firmware can be loaded automatically via the hotplug manager ... +- For the dvb-ttpci driver/av7110 card you can download the firmware files from ... +file you probably know from the 2.4 DVB releases driver. ...
    (Linux-Kernel)
  • Re: Fedora 5 - Intel Pro/Wireless LAN 2100 3B Mini PCI adapter woes.
    ... Guide to install the Intel PRO Wireless 2100 Driver for Linux ... The ipw2100 binary firmware image. ...
    (comp.os.linux.networking)
  • Filmware Installation
    ... Broadcom wireless chip needs software, called "firmware", that runs on ... To get such firmware on your system, you must download the ... driver from a legal distribution point, ... extract the firmware from that Broadcom driver by using b43-fwcutter ...
    (Ubuntu)
  • Mark IPW2100 as BROKEN: Fatal interrupt. Scheduling firmware restart.
    ... Following bug exists in the ipw2100 driver/firmware for years and Intel ... Scheduling firmware restart. ... this than to mark ipw2100 driver as broken, since that is what it is. ...
    (Linux-Kernel)