From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 02:11: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 BB23D106566C for ; Sat, 20 Aug 2011 02:11:03 +0000 (UTC) (envelope-from bhutchings@solarflare.com) Received: from exchange.solarflare.com (mail.solarflare.com [216.237.3.220]) by mx1.freebsd.org (Postfix) with ESMTP id 9CCAE8FC08 for ; Sat, 20 Aug 2011 02:11:03 +0000 (UTC) Received: from [192.168.4.185] ([88.96.1.126]) by exchange.solarflare.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 19 Aug 2011 19:11:01 -0700 From: Ben Hutchings To: Ben Gray In-Reply-To: <4E4E3522.6030207@gmail.com> References: <4E4E3522.6030207@gmail.com> Content-Type: text/plain; charset="UTF-8" Organization: Solarflare Communications Date: Sat, 20 Aug 2011 03:11:00 +0100 Message-ID: <1313806260.2814.57.camel@deadeye> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Aug 2011 02:11:01.0951 (UTC) FILETIME=[68B784F0:01CC5EDE] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.500.1024-18332.005 X-TM-AS-Result: No--12.564700-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No 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 02:11:03 -0000 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.