Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 11:27:34 -0700
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Ben Gray <ben.r.gray@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Test tools for new network driver
Message-ID:  <20110819182734.GC17324@michelle.cdnetworks.com>
In-Reply-To: <4E4E3522.6030207@gmail.com>
References:  <4E4E3522.6030207@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 19, 2011 at 11:04:18AM +0100, Ben Gray wrote:
> Hi,
> 
>     I'm not sure if this the right list to post to, but here goes ...
> 
>     I'm currently writing a driver for the SMSC LAN95xx range of USB to 
> Ethernet adapter chips 
> (http://www.smsc.com/index.php?tid=300&pid=135&tab=1). The basic RX/TX 
> works and now I'm trying to get the H/W checksum offload working, 
> however I've come across some problems with the H/W implementation, e.g. 
> it doesn't work with small (<64 byte) packets.
> 

In old days, it was common that see hardware issues where TX
checksum offloading does not work unless you manually pad the frame
to satisfy minimal frame size(60 bytes).  Check if the controller
has auto-padding feature or try manually pad it.

Note, current USB stack lacks TX/RX checksum offloading support. I
have a working patch which would give you some idea.

uether patch:
http://people.freebsd.org/~yongari/axe/usb_ethernet.diff4
axe(4) to enable TX/RX checksum offloading:
http://people.freebsd.org/~yongari/axe/axe_csum.diff4

>     So I was wondering if anyone knows of any test tools I can use to 
> fire all the different unusual sort of packets at the interface to see 
> how the H/W csum reacts, i.e. runt packets, packets with IP options, 
> IPv6 packets with extension headers, etc.
> 

I'm not aware of tools that can do you mentioned above. However, I
guess you can generate many test cases with existing tools(ping,
netperf etc).

>     Another question I had was; is there a kernel function to generate 
> a random MAC address ? Or is there a FreeBSD (or FOSS equivalent) 
> Ethernet manufacturer ID I could use for randomly generated MAC addresses ?
> 

See sk(4) how it uses randomly generated station address.

>     The primarily purpose is for the range of Texas Instruments ARM 
> development boards (Pandaboard & Beagleboard), however there does exist 
> at least one USB dongle you can buy for the PC which uses this chipset.
> 
> Thanks in advance,
> Ben



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