Subject: Re: ugen change for review (try 2)
To: Greg Troxel <gdt@ir.bbn.com>
From: Hans Petter Selasky <hselasky@c2i.net>
List: tech-kern
Date: 07/21/2006 20:01:04
On Friday 21 July 2006 19:46, Greg Troxel wrote:
> Hans Petter Selasky <hselasky@c2i.net> writes:
> > Does your USB device send short packets, so that you get short transfers?
>
> No, the USRP only sends full-sized packets.
>
> > What buffer size do you use?
>
> We've tried various buffer sizes, from 128KB to 2MB.
>
> > I would suggest enabling your change by default, and no IOCTL's to
> > enable it,
>
> As I explained to Berndt, that would change the semantics of ugen(4).
> > 
> > but I would rather use a block buffer, than a ring buffer. That way
> > it is possible to pass short packets to the user application. With a
> > ring buffer, short packets get lost, which sometimes are important
> > for synchronization.
> >
> > I am planning a change similiar to yours on FreeBSD, but I have not had
> > time to do it. What I have done so far is to implement a block buffer
> > system:
>
> Are you trying to preserve the packet boundaries? 

Yes, some USB devices require that.

> We are explicitly 
> not worrying about that, since a) those currently have no semantic 
> significance with the USRP and b) it's all full-sized packets, so
> alignment is maintained.
>
> > When it comes to the IOCTL name, I would prefer something like:
> > USB_SET_BULK_READ_BSIZE and USB_SET_BULK_WRITE_BSIZE .
>
> The ioctl sets both buffer size and the size of the transaction passed
> to the lower layers, and those names don't convey that.

Ok.

--HPS