From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 19 07:56:16 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D79716A400 for ; Thu, 19 Apr 2007 07:56:16 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 39CCB13C480 for ; Thu, 19 Apr 2007 07:56:12 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l3J7u8pt085191; Thu, 19 Apr 2007 11:56:08 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l3J7u5dm085188; Thu, 19 Apr 2007 11:56:05 +0400 (MSD) (envelope-from yar) Date: Thu, 19 Apr 2007 11:56:05 +0400 From: Yar Tikhiy To: Alan Garfield Message-ID: <20070419075604.GB60301@comp.chem.msu.su> References: <1176096815.4064.6.camel@hiro.auspc.com.au> <20070409.222300.-1350498722.imp@bsdimp.com> <20070417171622.GB95814@comp.chem.msu.su> <1176858032.4426.3.camel@hiro.auspc.com.au> <20070418074455.GD36635@comp.chem.msu.su> <1176948890.4175.50.camel@hiro.auspc.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1176948890.4175.50.camel@hiro.auspc.com.au> User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: RFI: Ethernet driver ported from Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2007 07:56:16 -0000 On Thu, Apr 19, 2007 at 12:14:50PM +1000, Alan Garfield wrote: > On Wed, 2007-04-18 at 11:44 +0400, Yar Tikhiy wrote: > > > > > Anyway, back to figuring out arp. UGH! > > > > As a rule, an Ethernet driver needn't worry about ARP by itself > > because ARP has own separate module in the network stack. Does > > your driver have a partucular reason to? > > Apart from using fake MAC addresses, I don't think so. I don't understand the concept of a fake MAC address, sorry. The classic Ethernet is a broadcast medium by design, so a very primitive NIC can just receive all traffic and let the driver or network stack decide if the host wants a particular frame. On output, the network stack can usually put any source MAC address into the frame -- it's true for the most of Ethernet network interfaces. So MAC addresses are always "fake" in a sense, as neither the hardware nor the medium design enforces them. If I understand your case right, the two processors, CPU and SP, share a hardware buffer, in which they can put some data for the other side, e.g., an Ethernet frame, and then prod the other side with an interrupt. That fits the Ethernet model ideally, so there should be no need for hacks unless the other side, the SP running a special Linux, takes the whole thing wrong. -- Yar