On Mon, 2007-06-04 at 14:25 +0300, Avi Kivity wrote:
> Rusty Russell wrote:
> >
> >> Networking hardware generally services descriptors in a FIFO manner.
> >>
> >
> > Well, ethernet guarantees order. Not sure about others tho...
>
> OT: Does that hold for bonded interfaces too?
Sorry, I don't know. The ethernet standard promises in-order, but I'd
imagine you'd need to prepend a header to get this to work with bonding
in general...
> >> virtio may not (for example, it may offload copies of larger packets to
> >> a dma engine such as I/OAT, resulting in a delay, but copy smaller
> >> packets immediately). that means that there will be some mismatch
> >> between virtio drivers and real hardware drivers.
> >>
> >
> > I think your point is that the completion bitmap (or indeed, the current
> > approach) does not maintain order? Hmm, this is more convincing to me
> > than cache arguments, since some devices might want ordering and want
> > more than a single io in flight.
>
> Well, it wasn't really; sorry for being unclear. My point was that
> virtio interfaces will not match hardware exactly.
>
> My objection is to "scan all slots, occupied or not, for completion". I
> think virtio should present completed descriptors without the need for
> scanning, even if it means looking a bit different from a typical
> ethernet driver.
It's not just the ethernet driver, it's virtio drivers in general. One
reason the Xen drivers are viewed with such horror is that they look
nothing like normal Linux drivers.
But that just means that the linked list(s) should be in the "struct
virtio_device" rather than an arg to the "interrupt" handler. I think,
given that the network code doesn't want to process used outbufs in the
interrupt handler, this is the Right Thing anyway.
I'll send here once it's done...
Thanks,
Rusty.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|