Re: [ovs-dev] [PATCH] datapath-windows: Move OVS_IPHELPER_INSTANCE to IpHelper.h

2018-10-31 Thread Alin Gabriel Serdean
Also applied on branch-2.10.

—
Alin.

> On 2 Oct 2018, at 20:07, Alin Gabriel Serdean  wrote:
> 
> Applied on master!
> 
>> On 2 Oct 2018, at 16:16, Alin Gabriel Serdean  wrote:
>> 
>> 
>> 
>>> On 30 Sep 2018, at 14:53, Alin Gabriel Serdean >> > wrote:
>>> 
 
 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 >>> >
 —
 
>>> 
>>> Thanks for the patch!
>>> 
>>> Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>
>>> 
>>> 
>>> 
>> 
>> Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>
> 
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] datapath-windows: Move OVS_IPHELPER_INSTANCE to IpHelper.h

2018-10-02 Thread Alin Gabriel Serdean
Applied on master!

> On 2 Oct 2018, at 16:16, Alin Gabriel Serdean  wrote:
> 
> 
> 
>> On 30 Sep 2018, at 14:53, Alin Gabriel Serdean > > wrote:
>> 
>>> 
>>> 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 >> >
>>> —
>>> 
>> 
>> Thanks for the patch!
>> 
>> Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>
>> 
>> 
>> 
> 
> Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] datapath-windows: Move OVS_IPHELPER_INSTANCE to IpHelper.h

2018-10-02 Thread Alin Gabriel Serdean


> On 30 Sep 2018, at 14:53, Alin Gabriel Serdean  wrote:
> 
>> 
>> 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 > >
>> —
>> 
> 
> Thanks for the patch!
> 
> Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>
> 
> 
> 

Acked-by: Alin Gabriel Serdean mailto:aserd...@ovn.org>>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] datapath-windows: Move OVS_IPHELPER_INSTANCE to IpHelper.h

2018-09-26 Thread Sairam Venugopal
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 
---
 datapath-windows/ovsext/IpHelper.c | 32 ++-
 datapath-windows/ovsext/IpHelper.h | 45 ++
 2 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/datapath-windows/ovsext/IpHelper.c 
b/datapath-windows/ovsext/IpHelper.c
index c734b0e..876da92 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;
-GUIDnetCfgId;
-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(>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();
 ExAcquireResourceExclusiveLite(, TRUE);
 
diff --git a/datapath-windows/ovsext/IpHelper.h 
b/datapath-windows/ovsext/IpHelper.h
index 0556965..25adf6e 100644
--- a/datapath-windows/ovsext/IpHelper.h
+++ b/datapath-windows/ovsext/IpHelper.h
@@ -32,17 +32,44 @@
 
 #define OVS_IPNEIGH_TIMEOUT 1   // 10 s
 
+ /*
+ * 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;
+GUIDnetCfgId;
+MIB_IF_ROW2 internalRow;
+MIB_IPINTERFACE_ROW internalIPRow;
+UINT32  ipAddress;
+
+ERESOURCE   lock;
+} OVS_IPHELPER_INSTANCE, *POVS_IPHELPER_INSTANCE;
 
 typedef struct _OVS_IPNEIGH_ENTRY {
-UINT8 macAddr[ETH_ADDR_LEN];
-UINT16refCount;
-UINT32ipAddr;
-UINT32pad;
-UINT64timeout;
-LIST_ENTRYlink;
-LIST_ENTRYslink;
-LIST_ENTRYfwdList;
-PVOID context;
+UINT8   macAddr[ETH_ADDR_LEN];
+UINT16  refCount;
+UINT32  ipAddr;
+UINT32  pad;
+UINT64  timeout;
+LIST_ENTRY  link;
+LIST_ENTRY  slink;
+LIST_ENTRY  fwdList;
+POVS_IPHELPER_INSTANCE  instance;
 } OVS_IPNEIGH_ENTRY, *POVS_IPNEIGH_ENTRY;
 
 typedef struct _OVS_IPFORWARD_ENTRY {
-- 
2.9.0.windows.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev