[ovs-dev] [PATCH 04/10] [PATCH v2] datapath-windows: Update OVS_SWITCH_CONTEXT: external and internal port

Alin Serdean aserdean at cloudbasesolutions.com
Thu Oct 9 17:46:55 UTC 2014


The fields externalVport and internalVport of the OVS_SWITCH_CONTEXT
struct are currently defined as PVOID. However, all over the code they
are used as POVS_VPORT_ENTRY. In order to improve clarity and reduce the
need for useless casts to POVS_VPORT_ENTRY, this patch changes the type
from PVOID to POVS_VPORT_ENTRY.

This patch does not cleanup the code that already uses casts to
POVS_VPORT_ENTRY. This cleanup can be done later on as well.

Signed-off-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
Co-authored-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin at vmware.com>
Tested-by: Nithin Raju <nithin at vmware.com>
---
 datapath-windows/ovsext/Switch.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/datapath-windows/ovsext/Switch.h b/datapath-windows/ovsext/Switch.h
index 5199268..f7acd87 100644
--- a/datapath-windows/ovsext/Switch.h
+++ b/datapath-windows/ovsext/Switch.h
@@ -53,6 +53,8 @@
 
 #define OVS_HASH_BASIS   0x13578642
 
+typedef struct _OVS_VPORT_ENTRY *POVS_VPORT_ENTRY;
+
 typedef struct _OVS_DATAPATH
 {
    PLIST_ENTRY             flowTable;       // Contains OvsFlows.
@@ -104,8 +106,8 @@ typedef struct _OVS_SWITCH_CONTEXT
 
     NDIS_SWITCH_PORT_ID     externalPortId;
     NDIS_SWITCH_PORT_ID     internalPortId;
-    PVOID                   externalVport;  // the virtual adapter vport
-    PVOID                   internalVport;
+    POVS_VPORT_ENTRY        externalVport;  // the virtual adapter vport
+    POVS_VPORT_ENTRY        internalVport;
 
     PVOID                  *vportArray;
     PLIST_ENTRY             nameHashArray;  // based on ovsName
-- 
1.9.4.msysgit.1



More information about the dev mailing list