[ovs-dev] [PATCH] netlink-socket.c: use read/write ioctl instead of ReadFile/WriteFile

Eitan Eliahu eliahue at vmware.com
Wed Aug 27 20:46:54 UTC 2014

Yes, I'll open a gerrit issue for that.
From: Nithin Raju
Sent: Wednesday, August 27, 2014 1:16 PM
To: Eitan Eliahu
Cc: dev at openvswitch.org; aserdean at cloudbasesolutions.com
Subject: Re: [ovs-dev] [PATCH] netlink-socket.c: use read/write ioctl instead of        ReadFile/WriteFile

On Aug 27, 2014, at 11:19 AM, Eitan Eliahu <eliahue at vmware.com> wrote:

> +        if (!DeviceIoControl(sock->handle, OVS_IOCTL_READ,
> +                             NULL, 0, tail, sizeof tail, &bytes, NULL))
> ...
> +                memcpy(ofpbuf_data(buf), tail, retval);
> +                ofpbuf_set_size(buf, retval);
> We probably want to send down the "struct iovec iov" (rather than the tail)  parameter so we can use the original and avoid the data copy.
> This will require to map the user mode virtual address into the kernel (since the kernel executed in the context of the use mode thread we don't have to pin this memory).

That is a good point. We'll have to add support for mapping userspace addresses in the kernel and using them. It can be done in the future.

Are you fine with the change as-is for the limited functionality it is supposed to provide? I want to get this committed to unblock the read/write workflow. Alin might have a more formal patch at some point.


More information about the dev mailing list