diff options
author | Nithin Raju <nithin@vmware.com> | 2014-10-23 17:33:12 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-10-28 08:40:49 -0700 |
commit | f16130074152b301515f52867cf9eaa012e4dc54 (patch) | |
tree | 3caff443f39f381ac243c9185cb85ad38297f647 /datapath-windows/ovsext/Vport.h | |
parent | b3b8a9c307c0154c0f65901986f57f14522b50cb (diff) | |
download | openvswitch-f16130074152b301515f52867cf9eaa012e4dc54.tar.gz |
datapath-windows: Refactor core in Vport.c.
We do a bunch of changes that did not make sense to split up into
smaller patches:
1. Add descriptive comments to the important functions to clarify
purpose.
2. s/OvsInitVportCommon/InitHvVportCommon - this function is common code
for every port that shows up on the Hyper-V switch.
3. Introduce a InitOvsVportCommon() that is common code for evrey port
that gets added from userspace. This is especially useful for ports
that are not present on the Hyper-V switch. ie. tunnel ports and
bridge-internal ports.
4. Fix OvsClearAllSwitchVports() to remove ports from both the lists:
the ones added from Hyper-V as well as the ones added from OVS
userspace.
5. Update OvsInitVxlanTunnel() to not call into InitHvVportCommon
(formerly OvsInitVportCommon()) since it is not a port on the Hyper-v
switch. In a later patch in the series, we'll call
InitOvsVportCommon() for a VXLAN port.
6. 'numNonHvVports' increments and decrements ONLY for ports that are
added from OVS userspace but not present on the Hyper-V switch.
Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Ankur Sharma <ankursharma@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Vport.h')
-rw-r--r-- | datapath-windows/ovsext/Vport.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Vport.h b/datapath-windows/ovsext/Vport.h index 4757d807e..bf9028e74 100644 --- a/datapath-windows/ovsext/Vport.h +++ b/datapath-windows/ovsext/Vport.h @@ -203,7 +203,9 @@ OvsGetExternalMtu() VOID OvsRemoveAndDeleteVport(POVS_SWITCH_CONTEXT switchContext, POVS_VPORT_ENTRY vport); -NDIS_STATUS OvsInitVportCommon(POVS_SWITCH_CONTEXT switchContext, +NDIS_STATUS InitHvVportCommon(POVS_SWITCH_CONTEXT switchContext, + POVS_VPORT_ENTRY vport); +NDIS_STATUS InitOvsVportCommon(POVS_SWITCH_CONTEXT switchContext, POVS_VPORT_ENTRY vport); NTSTATUS OvsInitTunnelVport(POVS_VPORT_ENTRY vport, OVS_VPORT_TYPE ovsType, UINT16 dstport); |