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

Alin Serdean aserdean at cloudbasesolutions.com
Thu Aug 28 14:14:48 UTC 2014


Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>

Kind Regards,
Alin.
________________________________________
From: dev [dev-bounces at openvswitch.org] on behalf of Eitan Eliahu [eliahue at vmware.com]
Sent: Thursday, August 28, 2014 1:01 AM
To: Eitan Eliahu; Nithin Raju
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH] netlink-socket.c: use read/write ioctl instead of        ReadFile/WriteFile

Acked-by: Eitan Eliahu <eliahue at vmware.com>

-----Original Message-----
From: dev [mailto:dev-bounces at openvswitch.org] On Behalf Of Eitan Eliahu
Sent: Wednesday, August 27, 2014 1:47 PM
To: Nithin Raju
Cc: dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH] netlink-socket.c: use read/write ioctl instead of ReadFile/WriteFile


Yes, I'll open a gerrit issue for that.
Thnks,
Eitan
________________________________________
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).

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

_______________________________________________
dev mailing list
dev at openvswitch.org
https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6ViHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=w2J3%2BXT3epx%2FmqiChgH7BLE5reu7HJQaxjBJzpLwDo0%3D%0A&s=664e7a63287c1fde79e0964922eb3485f92d14bea65996c0f391a69128d74c16
_______________________________________________
dev mailing list
dev at openvswitch.org
http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list