Subject: Re: Suggested changes to bus_dma interface
To: Dennis Ferguson <dennis@jnx.com>
From: Charles M. Hannum <mycroft@MIT.EDU>
List: tech-kern
Date: 09/26/1996 02:34:52
Dennis Ferguson <dennis@jnx.com> writes:

> 
> > bus_dma_segment_t
> > bus_dma_map(struct uio *uio, int maxsize, int start, int end, int alignment)
> 
> I'm actually wondering about the thing Matt obliquely mentioned (which is
> far more important than anything I've been fixated on), that is how would
> a network interface use this?  The constraints there are:
> 
> (1) No uio structure

So you create one.  Indeed, you could actually *benefit* from this,
because you could point multiple DMA segments at the contents of
several mbufs, and copy an entire packet in or out at once.

> (2) You sometimes can't do partial operations, the interface may constrain
>     you to deliver the full contents of a packet in a single s/g operation.

If a device driver is creating such a restriction, then it can simply
ask for segments until there are no more, and use them all at once.  I
don't see a problem.

I don't see how an intermediate bus could assert such a restriction,
but if it did, the old proposal wouldn't deal with it either.