From owner-freebsd-stable Fri Oct 4 21:22:54 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D484937B401 for ; Fri, 4 Oct 2002 21:22:52 -0700 (PDT) Received: from devonshire.cnchost.com (devonshire.concentric.net [207.155.248.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8759143E65 for ; Fri, 4 Oct 2002 21:22:52 -0700 (PDT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by devonshire.cnchost.com id AAA28047; Sat, 5 Oct 2002 00:22:52 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200210050422.AAA28047@devonshire.cnchost.com> To: Don Bowman Cc: "'stable@freebsd.org'" Subject: Re: packet generator, GigE linerate, precomputed packets In-reply-to: Your message of "Fri, 04 Oct 2002 23:23:01 EDT." Date: Fri, 04 Oct 2002 21:22:50 -0700 From: Bakul Shah Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Is anyone aware of a method to efficiently transmit preconstructed > packets under FreeBSD? This is for use in a network product > test environment. You will need something specialized to bypass the normal ponderous flow. One idea is to add an ioctl to copy in a whole bunch of packets. Add more ioctls to do a little bit of processing and send (or resend). This avoids most of the user/kernel crossings. Similarly you can add logic to compare received packets to "expected" packets. May be even some mmap games to examine data from a user program. But the key thing is to set things up and get out of the way. You won't achieve SmartBits speeds though. SmartBits are easy to use but exploiting their limited flexibility is not. Still might be worth investigating if you can work with them. > Should I be looking @ writing a kernel module to do this? More like extending either if_ethersubr.c or a particular netif driver. > I really need to achieve line rate @ 1Gbps w/ minimal size > packets (so a ~3.2Mpps transmit rate). Let us see: you have about 672 ns per min size packet. Good luck:-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message