From: Alin Serdean Date: Thu, 9 Oct 2014 17:46:55 +0000 (+0000) Subject: datapath-windows: Update OVS_SWITCH_CONTEXT: external and internal port X-Git-Tag: v2.4.0~1212 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=9930aae56893b87b90b32e3a444e73b715167bf9 datapath-windows: Update OVS_SWITCH_CONTEXT: external and internal port 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 Co-authored-by: Alin Gabriel Serdean Acked-by: Ankur Sharma Acked-by: Eitan Eliahu Acked-by: Nithin Raju Tested-by: Nithin Raju Signed-off-by: Ben Pfaff --- diff --git a/datapath-windows/ovsext/Switch.h b/datapath-windows/ovsext/Switch.h index 51992686c..f7acd8719 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