From owner-freebsd-net Tue Feb 13 18:23:16 2001 Delivered-To: freebsd-net@freebsd.org Received: from inetfw.csl.sony.co.jp (inetfw.SonyCSL.CO.JP [203.137.129.4]) by hub.freebsd.org (Postfix) with ESMTP id 31A2437B503 for ; Tue, 13 Feb 2001 18:23:13 -0800 (PST) Received: from hotaka.csl.sony.co.jp (hotaka.csl.sony.co.jp [43.27.98.57] (may be forged)) by inetfw.csl.sony.co.jp (8.11.2+3.4W/3.7Ws3/inetfw/2001012518/smtpfeed 1.08) with ESMTP id f1E2NBu09425; Wed, 14 Feb 2001 11:23:11 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by hotaka.csl.sony.co.jp (8.9.3+3.2W/3.7Ws3/hotaka/2000061722) with ESMTP id LAA84977; Wed, 14 Feb 2001 11:23:10 +0900 (JST) To: rizzo@aciri.org Cc: net@freebsd.org Subject: Re: fxp performance ? In-Reply-To: <200102140053.f1E0rET55388@iguana.aciri.org> References: <200102140053.f1E0rET55388@iguana.aciri.org> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010214112310G.kjc@csl.sony.co.jp> Date: Wed, 14 Feb 2001 11:23:10 +0900 From: Kenjiro Cho X-Dispatcher: imput version 20000228(IM140) Lines: 40 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Luigi Rizzo wrote: > I am trying to generate (send only) packets at maximum rate on a > 100Mbit ethernet, which means using 64-byte packets and, once you > do the math (counting preamble, packet and inter-packet gap), > results in some 148.000 packets-per-second (and just to get the > idea, this also means that a new packet is transmitted every 6.72us). > > Note, the above is not trivial as you need a fast CPU, and probably > some tricks in order to avoid parf of the overhead of ip_output(). > > In any case, on botu a P3-650 and an Athlon-750, I managed to > achieve this speed using the "dc" driver. When i tried the same > with the 'fxp' driver, there was no way i managed to go above > 105-110.000 packets per second (meaning an average of 9.1us/packet). > > Any idea on what is going on ? I have spent quite some time in > the fxp driver and cannot really tell where the problem is. > Unfortunately my diagnostic tools do not let me see what is going > on on the wire, whether the spacing is larger than it should be, > etc. etc. It might be related to the fact that the fxp driver doesn't generate a transmission complete interrupt unless the interface queue length is exactly 119. Does the following change make any difference? --- if_fxp.c- Wed Feb 14 11:13:42 2001 +++ if_fxp.c Wed Feb 14 11:14:27 2001 @@ -1183,6 +1183,7 @@ * going again if suspended. */ if (txp != NULL) { + txp->cb_command |= FXP_CB_COMMAND_I; fxp_scb_wait(sc); CSR_WRITE_1(sc, FXP_CSR_SCB_COMMAND, FXP_SCB_COMMAND_CU_RESUME); } -Kenjiro To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message