Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 10:07, Hannes Reinecke wrote: > On 07/01/2011 10:02 AM, Alexander Graf wrote: >> >> On 01.07.2011, at 09:42, Hannes Reinecke wrote: >> >>> Occasionally, the buffer needs to be placed at a offset within >>> the iovec when copying the buffer to the iovec. >> >> So this is a buf

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:03 AM, Paolo Bonzini wrote: On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, - const void *buf, size_t size) + const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Bummer. Cheers, Hannes -

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Alexander Graf
On 01.07.2011, at 09:42, Hannes Reinecke wrote: > Occasionally, the buffer needs to be placed at a offset within > the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense to also modify iov_to_buf respectively then, so the API stays simi

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
On 07/01/2011 10:02 AM, Alexander Graf wrote: On 01.07.2011, at 09:42, Hannes Reinecke wrote: Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. So this is a buffer into the iovec, right? Wouldn't it make sense > to also modify iov_

Re: [Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Paolo Bonzini
On 07/01/2011 09:42 AM, Hannes Reinecke wrote: size_t iov_from_buf(struct iovec *iov, unsigned int iovcnt, -const void *buf, size_t size) +const void *buf, size_t offset, size_t size) Wrong commit subject, it seems. :) Paolo

[Qemu-devel] [PATCH 1/3] iov: Add 'offset' parameter to iov_to_buf()

2011-07-01 Thread Hannes Reinecke
Occasionally, the buffer needs to be placed at a offset within the iovec when copying the buffer to the iovec. Signed-off-by: Hannes Reinecke --- hw/virtio-net.c|2 +- hw/virtio-serial-bus.c |2 +- iov.c | 23 ++- iov.h |