I'm not sure even why the device name is hard coded while it appears in the 
interface header file.
Thanks Saurabh.
Eitan

-----Original Message-----
From: Saurabh Shah 
Sent: Thursday, September 04, 2014 4:50 PM
To: Eitan Eliahu; dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH] Windows NetLink Socket - Support for 
asynchronous event notification



>We keep an outstanding, out of band, I/O request in the driver at all 
>time.
>Once an event generated the driver queues the event message, completes 
>the pending I/O and unblocks the calling thread through setting the 
>event in the overlapped structure n the  NL socket. The thread will 
>read all all event messages synchronous through the call of 
>nl_sock_recv()
>---
> datapath-windows/include/OvsDpInterfaceExt.h |  1 +
> lib/netlink-socket.c                         | 82
>++++++++++++++++++++++++++--
> 2 files changed, 79 insertions(+), 4 deletions(-)
>
>diff --git a/datapath-windows/include/OvsDpInterfaceExt.h
>b/datapath-windows/include/OvsDpInterfaceExt.h
>index 73dfcbe..ab2088a 100644
>--- a/datapath-windows/include/OvsDpInterfaceExt.h
>+++ b/datapath-windows/include/OvsDpInterfaceExt.h
>@@ -70,6 +70,7 @@
> /* Commands available under the OVS_WIN_CONTROL_FAMILY. */  enum 
>ovs_win_control_cmd {
>     OVS_CTRL_CMD_WIN_GET_PID,
>+    OVS_CTRL_CMD_WIN_PEND_REQ
> };
> 
> #endif /* __OVS_DP_INTERFACE_EXT_H_ */ diff --git 
>a/lib/netlink-socket.c b/lib/netlink-socket.c index a6be186..4b535f0 
>100644
>--- a/lib/netlink-socket.c
>+++ b/lib/netlink-socket.c
>@@ -80,6 +80,7 @@ static int get_sock_pid_from_kernel(struct nl_sock 
>*sock);  struct nl_sock {  #ifdef _WIN32
>     HANDLE handle;
>+    OVERLAPPED overlapped;
> #else
>     int fd;
> #endif
>@@ -139,21 +140,30 @@ nl_sock_create(int protocol, struct nl_sock **sockp)
>     sock = xmalloc(sizeof *sock);
> 
> #ifdef _WIN32
>-    sock->handle = CreateFileA("\\\\.\\OpenVSwitchDevice",
>+    sock->handle = CreateFile(TEXT("\\\\.\\OpenVSwitchDevice"),

Minor nit: s/OpenVSwitchDevice/OpenvSwitchDevice

Saurabh

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to