From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 16:40:03 2011 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 AA7CE106564A for ; Sat, 20 Aug 2011 16:40:03 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 258448FC08 for ; Sat, 20 Aug 2011 16:40:02 +0000 (UTC) Received: from vhoffman-macbooklocal.local ([10.10.10.20]) (authenticated bits=0) by unsane.co.uk (8.14.4/8.14.4) with ESMTP id p7KGe1Wm065187 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 20 Aug 2011 17:40:02 +0100 (BST) (envelope-from vince@unsane.co.uk) Message-ID: <4E4FE361.3040000@unsane.co.uk> Date: Sat, 20 Aug 2011 17:40:01 +0100 From: Vincent Hoffman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Ben Gray References: <4E4E3522.6030207@gmail.com> <1313806260.2814.57.camel@deadeye> <17D3FAD0-1372-45BA-B4A1-02840B925F1F@gmail.com> In-Reply-To: <17D3FAD0-1372-45BA-B4A1-02840B925F1F@gmail.com> X-Enigmail-Version: 1.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-net@freebsd.org" Subject: Re: Test tools for new network driver 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, 20 Aug 2011 16:40:03 -0000 On 20/08/2011 11:18, Ben Gray wrote: > Thanks everyone, > > Cheers for the tips on the mac address, I must admit I wasn't aware of the locally assigned bit in the address. > > As for H/W checksum offloading, the main problem is the datasheet for the chip is under NDA which I'm unwilling to sign, so I'm working off the Linux driver. It seems under Linux if the TCP/UDP checksum fails it reverts to a software calculation and as far as I can tell FreeBSD doesn't do this. Hence it seems under Linux the driver reports incorrect csums but the kernel covers up for it. > > And thanks for the tips on network test tools, I'll check 'em it. I was hoping there was a nice FOSS test tool. I might be wrong but i thought scapy (http://www.secdev.org/projects/scapy/ and in ports) was meant to be pretty good for crafting custom packets. I think its lacking ipv6 though. there is also nemesis (http://nemesis.sourceforge.net and in ports) This is based purely on reading too many mailing lists though, I havent actually needed to use either. Vince > > Thanks, > Ben > > On 20 Aug 2011, at 03:11, Ben Hutchings wrote: > >> On Fri, 2011-08-19 at 11:04 +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. >>> >>> 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. >> There are various commercial tools and test suites, and I would expect >> that most vendors of network controllers and IP blocks have their own >> test suites that attempt to cover this. I know Solarflare has used >> tools from Oktet Labs (see ) >> among others. >> >>> 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 ? >> [...] >> >> You can use any (almost) any address with byte 0 bit 0 cleared (not >> multicast) and byte 0 bit 1 set (locally assigned). I don't know >> whether FreeBSD has a function for this, but Linux has one which just >> gets 6 random bytes and then changes the first byte to conform to this. >> >> There are a small number of old OUIs which should be avoided; see >> . >> >> Ben. >> >> -- >> Ben Hutchings, Staff Engineer, Solarflare >> Not speaking for my employer; that's the marketing department's job. >> They asked us to note that Solarflare product names are trademarked. >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"