From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 10:18:47 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 461E8106566B for ; Sat, 20 Aug 2011 10:18:47 +0000 (UTC) (envelope-from ben.r.gray@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id CCC958FC12 for ; Sat, 20 Aug 2011 10:18:46 +0000 (UTC) Received: by wwe5 with SMTP id 5so1048267wwe.1 for ; Sat, 20 Aug 2011 03:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:references:from:content-type:x-mailer:in-reply-to :message-id:date:cc:content-transfer-encoding:mime-version; bh=1KMCPZOXg/9r43PqERincF3+nGN/x6G489dUvyfmO3A=; b=PMKAMCV9fjeZ/IIuMhbwkxIFSZ/5XtMVgrUcVVGCXzrlHUP0+/RT5Vs0iMVcywKMV4 vwwikeSFNl/TRAS/arcv1XJNGsPFuqqIjmKDhsepcsnHazWwLN7+MS5k3MpN5oMCVa0s 2uZ7rGReEl/Aa3JZ7MNrw5MBIQo28vZ0K4mwE= Received: by 10.227.174.206 with SMTP id u14mr306826wbz.59.1313835523999; Sat, 20 Aug 2011 03:18:43 -0700 (PDT) Received: from [10.236.168.51] ([82.132.243.68]) by mx.google.com with ESMTPS id p18sm1967997wbh.21.2011.08.20.03.18.40 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Aug 2011 03:18:42 -0700 (PDT) References: <4E4E3522.6030207@gmail.com> <1313806260.2814.57.camel@deadeye> From: Ben Gray Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (8C148) In-Reply-To: <1313806260.2814.57.camel@deadeye> Message-Id: <17D3FAD0-1372-45BA-B4A1-02840B925F1F@gmail.com> Date: Sat, 20 Aug 2011 11:18:18 +0100 Cc: "freebsd-net@freebsd.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8C148) 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 10:18:47 -0000 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 s= oftware calculation and as far as I can tell FreeBSD doesn't do this. Hence i= t 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 hopi= ng there was a nice FOSS test tool. 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, >>=20 >> I'm not sure if this the right list to post to, but here goes ... >>=20 >> I'm currently writing a driver for the SMSC LAN95xx range of USB to=20= >> Ethernet adapter chips=20 >> (http://www.smsc.com/index.php?tid=3D300&pid=3D135&tab=3D1). The basic RX= /TX=20 >> works and now I'm trying to get the H/W checksum offload working,=20 >> however I've come across some problems with the H/W implementation, e.g.=20= >> it doesn't work with small (<64 byte) packets. >>=20 >> So I was wondering if anyone knows of any test tools I can use to=20 >> fire all the different unusual sort of packets at the interface to see=20= >> how the H/W csum reacts, i.e. runt packets, packets with IP options,=20 >> IPv6 packets with extension headers, etc. >=20 > 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. >=20 >> Another question I had was; is there a kernel function to generate=20= >> a random MAC address ? Or is there a FreeBSD (or FOSS equivalent)=20 >> Ethernet manufacturer ID I could use for randomly generated MAC addresses= ? > [...] >=20 > 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. >=20 > There are a small number of old OUIs which should be avoided; see > . >=20 > Ben. >=20 > --=20 > 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. >=20