Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 05:00:26PM +0100, Daniel P. Berrangé wrote: > On Wed, May 18, 2022 at 12:42:37PM -0300, Jason Gunthorpe wrote: > > On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > > > > > >> Is there a really performance difference to just use: > > > >> > > > >> uint8_t buf

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Daniel P . Berrangé
On Wed, May 18, 2022 at 12:42:37PM -0300, Jason Gunthorpe wrote: > On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > > > >> Is there a really performance difference to just use: > > >> > > >> uint8_t buffer[size]; > > >> > > >> qemu_get_buffer(f, buffer, size); > > >> write(fd, buff

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > >> Is there a really performance difference to just use: > >> > >> uint8_t buffer[size]; > >> > >> qemu_get_buffer(f, buffer, size); > >> write(fd, buffer, size); > >> > >> Or telling it otherwise, what sizes are we talking here? > >

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Juan Quintela
Avihai Horon wrote: > On 5/16/2022 2:31 PM, Juan Quintela wrote: >> External email: Use caution opening links or attachments >> >> >> Avihai Horon wrote: >>> Add new function qemu_file_get_to_fd() that allows reading data from >>> QEMUFile and writing it straight into a given fd. >>> >>> This wil

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-17 Thread Avihai Horon
On 5/16/2022 2:31 PM, Juan Quintela wrote: External email: Use caution opening links or attachments Avihai Horon wrote: Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Si

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-16 Thread Juan Quintela
Avihai Horon wrote: > Add new function qemu_file_get_to_fd() that allows reading data from > QEMUFile and writing it straight into a given fd. > > This will be used later in VFIO migration code. > > Signed-off-by: Avihai Horon > --- > migration/qemu-file.c | 34 ++

[PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-12 Thread Avihai Horon
Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon --- migration/qemu-file.c | 34 ++ migration/qemu-file.h | 1 + 2 f