Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2004 01:23:38 +0900
From:      Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Dario Freni <saturnero@gufi.org>
Subject:   Re: Will rfc2734 be supported?
Message-ID:  <87ad3sgr1x.wl@tora.nunu.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ad3sgr1x.wl>