diff options
author | Sairam Venugopal <vsairam@vmware.com> | 2018-09-26 13:34:24 -0700 |
---|---|---|
committer | Alin Gabriel Serdean <aserdean@ovn.org> | 2018-10-02 17:45:51 +0300 |
commit | 13efe4209b6ab3671c3afadbc10c9136d6cce221 (patch) | |
tree | b079fb06ef982c3b62d12513542409d375752927 /datapath-windows/ovsext/IpHelper.c | |
parent | 0d5450a2ae14dcb98ad9f2546fc956910c9b8f54 (diff) | |
download | openvswitch-13efe4209b6ab3671c3afadbc10c9136d6cce221.tar.gz |
datapath-windows: Move OVS_IPHELPER_INSTANCE to IpHelper.h
Move the IPHelper Instance to the main header file and update the usage to
explicitly point to POVS_IPHELPER_INSTANCE instead of PVOID. Also rename
the ipn->context to ipn->instance to make it more readable.
Found by inspection.
Signed-off-by: Sairam Venugopal <vsairam@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/IpHelper.c')
-rw-r--r-- | datapath-windows/ovsext/IpHelper.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/datapath-windows/ovsext/IpHelper.c b/datapath-windows/ovsext/IpHelper.c index c734b0ecc..876da9225 100644 --- a/datapath-windows/ovsext/IpHelper.c +++ b/datapath-windows/ovsext/IpHelper.c @@ -40,34 +40,6 @@ static LIST_ENTRY ovsInstanceList; static ERESOURCE ovsInstanceListLock; /* - * This structure is used to define each adapter instance. - * - * Note: - * Only when the internal IP is configured and virtual - * internal port is connected, the IP helper request can be - * queued. - * - * We only keep internal IP for reference, it will not be used for determining - * SRC IP of the Tunnel. - * - * The lock must not raise the IRQL higher than PASSIVE_LEVEL in order for the - * route manipulation functions, i.e. GetBestRoute, to work. - */ -typedef struct _OVS_IPHELPER_INSTANCE -{ - LIST_ENTRY link; - - BOOLEAN isIpConfigured; - UINT32 portNo; - GUID netCfgId; - MIB_IF_ROW2 internalRow; - MIB_IPINTERFACE_ROW internalIPRow; - UINT32 ipAddress; - - ERESOURCE lock; -} OVS_IPHELPER_INSTANCE, *POVS_IPHELPER_INSTANCE; - -/* * FWD_ENTRY --------> IPFORWARD_ENTRY * | * |--------------------------------------> IPENIGH_ENTRY @@ -1070,7 +1042,7 @@ OvsCreateIPNeighEntry(PMIB_IPNET_ROW2 ipNeigh, RtlCopyMemory(entry->macAddr, ipNeigh->PhysicalAddress, ETH_ADDR_LEN); InitializeListHead(&entry->fwdList); - entry->context = (PVOID)instance; + entry->instance = instance; return entry; } @@ -1934,7 +1906,7 @@ OvsStartIpHelper(PVOID data) ipAddr = ipn->ipAddr; MIB_IPNET_ROW2 ipNeigh; NTSTATUS status; - POVS_IPHELPER_INSTANCE instance = (POVS_IPHELPER_INSTANCE)ipn->context; + POVS_IPHELPER_INSTANCE instance = ipn->instance; NdisReleaseSpinLock(&ovsIpHelperLock); ExAcquireResourceExclusiveLite(&ovsInstanceListLock, TRUE); |