From owner-freebsd-net@FreeBSD.ORG Mon Feb 9 08:23:40 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05F8016A4CE; Mon, 9 Feb 2004 08:23:40 -0800 (PST) Received: from tora.nunu.org (YahooBB219003182070.bbtec.net [219.3.182.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id D23FF43D1D; Mon, 9 Feb 2004 08:23:39 -0800 (PST) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from tora.nunu.org (unknown [192.168.1.2]) by tora.nunu.org (Postfix) with ESMTP id D07644ACAD; Tue, 10 Feb 2004 01:23:38 +0900 (JST) Date: Tue, 10 Feb 2004 01:23:38 +0900 Message-ID: <87ad3sgr1x.wl@tora.nunu.org> From: Hidetoshi Shimokawa To: Doug Rabson In-Reply-To: <1075800437.50848.14.camel@herring.nlsystems.com> References: <1075559223.615.9.camel@localhost> <87d68yowr7.wl@tora.nunu.org> <1075800437.50848.14.camel@herring.nlsystems.com> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 14) (Reasonable Discussion) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org cc: freebsd-firewire@freebsd.org cc: Dario Freni Subject: Re: Will rfc2734 be supported? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2004 16:23:40 -0000 At Tue, 03 Feb 2004 09:27:17 +0000, Doug Rabson wrote: > > If you are interested in implementing rfc2734, you need several steps. > > > > - Implement rfc2734 encapsulation as /sys/net/if_ethersubr.c for > > ethernt. rfc2734 uses very different packet format from ethernet. > > > > - Implement generic GASP receive routin in the firewire driver. > > You need this service for multicast/broadcast packet such as an arp > > packet. > > > > - Implement if_fw.c for the interface device. > > > > Though I'm not sure it actually worked, the firewire driver for > > FreeBSD-4.0 seems to have a support for IPoFW > > See ftp://ftp.uec.ac.jp/pub/firewire/ for the patch. > > I spent a little time recently thinking about what would be needed for > this and came to similar conclusions. The most interesting part is > implementing generic GASP receive. I think the nicest way of doing that Actually, it shouldn't be hard because the stream receiving is alread implemented in if_fwe.c and all we have to do is cut-and-paste that code and tweak fw_bind to be applied not only for normal asynchronus packets but also for GASP. > would be to implement a new network protocol for firewire, allowing > userland programs to do something like: > > struct sockaddr_firewire a; > s = socket(PF_FIREWIRE, SOCK_DGRAM, 0); > a.sof_address = 0x12345000; > ...; > bind(s, &a, sizeof a); > ...; > len = recv(s, buf, sizeof buf, 0); > > Internally, this probably means arranging for all asynchronous packets > to be DMA'd directly into mbufs and would probably change the firewire > code a great deal. Still, it might be worth it to gain a familiar > socket-based user api. This sound somewhat ironic for me. As far as I heard from Kobayashi-san, he first implemented the driver socket-based. (see patches for FreeBSD-4 at ftp://ftp.uec.ac.jp/pub/firewire/) But the implemention was not accepted by some FreeBSD developpers and he rewrite the current code for FreeBSD-5 from scratch. Apart from this, please note asynchronus "stream" packets is not received by "asynchrounus" receive DMA but by "isochronous" receive DMA in OHCI. It somewhat confusing. For normal asynchronus packets, OHCI doesn't support packet-per-buffer mode and supports only buffer-fill-mode. I think we need to copy packets to mbuf or something anyway. /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html