summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Event.h
diff options
context:
space:
mode:
authorNithin Raju <nithin@vmware.com>2015-11-25 12:00:55 -0800
committerGurucharan Shetty <gshetty@nicira.com>2015-11-25 13:54:28 -0800
commit9be4a8373394c3afcf80a4b02a12a914e7fc1eb9 (patch)
treecda8c971bd6c75490d4c0b4c0d6cd29a0fb7f786 /datapath-windows/ovsext/Event.h
parent958227c655d41821843e8d5d2b636f586b0cb5b4 (diff)
downloadopenvswitch-9be4a8373394c3afcf80a4b02a12a914e7fc1eb9.tar.gz
datapath-windows: cleanup events code
Turns out that we don't need to generate an event is practically useful only in case of a port disconnect to let userspace know. Hence, this event is being posted from HvDisconnectNic(). In case of a new port appearing, it seems that userspace is not interested in a new port unless it was added by userspace itself. In my tests, userspce would end up deleting the port when it got a new port notification, despite the port existing in OVSDB. The reasoning seems simple enough: - On Linux, OVS is integrated with the hypervisor (libvirt for eg) and a port (ie. netdev) gets created in the Linux kernel and then get added to OVSDB. When vswitchd picks up the port addition in OVSDB, it adds the port in the OVS kernel DP. - If the kernel netdev does not exist while OVS userspace tries to create the port in OVS kernel DP, port addition fails. Moreover, the only way to re-add the port is to trigger userspace to re-add the port by deleting the port in OVSDB and re-adding it. With this patch, I have verified that if a VIF gets disconnected on the Hyper-V switch, it disappears from the OVS kernel DP as well. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Event.h')
-rw-r--r--datapath-windows/ovsext/Event.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/Event.h b/datapath-windows/ovsext/Event.h
index a43a0bbd0..b087875a3 100644
--- a/datapath-windows/ovsext/Event.h
+++ b/datapath-windows/ovsext/Event.h
@@ -19,8 +19,7 @@
typedef struct _OVS_EVENT_QUEUE_ELEM {
LIST_ENTRY link;
- UINT32 portNo;
- UINT32 status;
+ OVS_EVENT_ENTRY event;
} OVS_EVENT_QUEUE_ELEM, *POVS_EVENT_QUEUE_ELEM;
typedef struct _OVS_EVENT_QUEUE {
@@ -39,7 +38,7 @@ VOID OvsCleanupEventQueue(VOID);
struct _OVS_OPEN_INSTANCE;
VOID OvsCleanupEvent(struct _OVS_OPEN_INSTANCE *instance);
-VOID OvsPostEvent(UINT32 portNo, UINT32 status);
+VOID OvsPostEvent(POVS_EVENT_ENTRY event);
NTSTATUS OvsSubscribeEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,
UINT32 inputLength);
NTSTATUS OvsPollEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer,