From owner-freebsd-net Wed Apr 26 1:45:43 2000 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 0CFD437BE1F; Wed, 26 Apr 2000 01:45:30 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id KAA23270; Wed, 26 Apr 2000 10:46:00 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200004260846.KAA23270@info.iet.unipi.it> Subject: Re: Proposal for ethernet, bridging, netgraph In-Reply-To: <20000426011134.A768@waterspout.com> from "C. Stephen Gunn" at "Apr 26, 2000 01:11:34 am" To: "C. Stephen Gunn" Date: Wed, 26 Apr 2000 10:46:00 +0200 (CEST) Cc: Archie Cobbs , freebsd-net@FreeBSD.ORG, luigi@FreeBSD.ORG, remy@boostworks.com, pavel@alum.mit.edu, nsayer@sftw.com, juliam@elischer.org X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Luigi -- Could you please remark about the optimizations in > if_ed.c? I want to fully udnerstand your motivations. > > Is it simply due to having the ed device in promisc mode for > bridging, and trying to optimize the "we don't need to forward > this packet" case? the problem is, "ed" transfers the packet using programmed I/O, which is terribly slow on the ISA bus (twice wire speed i think) and painfully slow on the PCI bus as well (i dont remember the figures but i don't think we reach 10MB/s which means that you monopolise the PCI bus and the CPU for 10-20% of the time (irrespective of CPU speed, mind you!) _just_ to transfer the packets from one interface. Because there is some likelyhood that most packets need not to be bridged, the optimization first transfers the 14-byte header, then calls bridge_in(), and then transfers the rest of the packet only if really necessary. I think you can have a 10x improvement by doing this. One could say "who cares about the 'ed' cards" but i think this is wrong attitude being these cards so cheap, widespread, and often (e.g. here) the only cards left on the market with a BNC connector. Anyways, my point for retaining the old semantics for ether_input is so that one does need to fix all drivers at once (and some are problematic, e.g. i am not really sure how to make "de" work.) cheers luigi -----------------------------------+------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL/FAX: +39-050-568.533/522 . via Diotisalvi 2, 56126 PISA (Italy) Mobile +39-347-0373137 -----------------------------------+------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message