On Wed, 2008-12-03 at 11:27 -0600, Anthony Liguori wrote: > Right now, virtio-net modifies the iovec structure in VirtQueueElement. This > is > evil. This creates an impossible situation if we want to bounce iovec buffers > in VirtQueueElement as we lose track of the original buffers and the resulting > free results in very bad things. > > I tried to refactor receive_headers() and iov_fill() to be able to skip the > header if present but failed miserably. Instead of spending more time trying > to > get that to work, I simply decided to leave the code as-is and copy the iovec > to a temporary buffer.
Sounds sensible to me. We could perhaps make things a bit more clear by never using the guest supplied header and always translating between the two header formats. But whatever way we do it, if we want to avoid modifying the original iovec structure, we need the temporary buffer. Cheers, Mark. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html