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

Nithin Raju nithin at vmware.com
Wed Aug 27 20:16:42 UTC 2014


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).

Eitan,
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.

thanks,
Nithin




More information about the dev mailing list