summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/IpHelper.c
Commit message (Collapse)AuthorAgeFilesLines
* datapath-windows: Fix static analysis warnings around ovsInstanceListLockAlin Serdean2017-11-291-4/+7
| | | | | | | | | Check for return value when trying to initialize ovsInstanceListLock. Also return the status back to caller of `OvsInitIpHelper`. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Shashank Ram <shashank08@gmail.com>
* datapath-windows: prettify logging in iphelperAlin Serdean2017-11-291-2/+3
| | | | | | | Found by inspection. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Shashank Ram <shashank08@gmail.com>
* datapath-windows: Check return status when using APIsAlin Serdean2017-08-021-7/+12
| | | | | | | | | | | Check the return status of `ConvertInterfaceLuidToAlias` and `RtlStringCbLengthW` and treat them accordingly. Also remove unneeded initialization for `interfaceName`. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
* datapath-windows: fix excessive stack usage in iphelperAlin Serdean2017-08-021-8/+7
| | | | | | | | | | | | `OvsGetOrResolveIPNeigh` uses a stack over 1024 bytes. Switch one parameter to be a pointer. Found using WDK 8.1 static code analysis. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
* datapath-windows: Add dummy parameter for NotifyRouteChange2Alin Serdean2017-08-021-1/+3
| | | | | | | | | Add a dummy parameter when using `NotifyRouteChange2` to keep static static analysis happy. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
* datapath-windows: interfaceName overflow in IpHelperAlin Serdean2017-08-021-2/+2
| | | | | | | | | | | Bump the size of interfaceName so an overflow cannot occur when using `ConvertInterfaceLuidToAlias`. Found using WDK 10 static code analysis. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
* datapath-windows: WDK 10 Iphelper rename local variablesAlin Serdean2017-01-041-9/+10
| | | | | | | | | | | | | Compiling under WDK 10 triggers some warnings in IpHelper, which lead to a failing build. The root cause is that local variables `ipAddr` and `link` hide the previous local declaration. This patch just renames the variables. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* datapath-windows: Add multiple switch internal portsAlin Serdean2016-12-201-244/+675
| | | | | | | | | | | | This patch adds multiple internal ports support to the windows datapath. All tunnels types have been updated to accommodate this new functionality. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Co-authored-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Paul Boca <pboca@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Avoid busy wait in OvsStartIpHelperShashank Ram2016-12-121-2/+13
| | | | | | | | | | | | | | | | | | | | | Previously, the IP Helper thread would wait for an event but with a timeout of 0, which resulted in the thread busy waiting causing high CPU usage by the kernel. Since the IP Helper thread is only required based on certain events, it makes sense to wait indefinitely till we receieve such an event notification to wake up the thread. This change aims to address this issue. When OvsEnqueueIpHelperRequest() or OvsInternalAdapterUp() is called, the ovsNumIpHelperRequests counter is incremented, but upon consumption of the request, is not decremented. Since the wakeup logic for the thread is determined by this counter value, we need to reset the counter back correctly once the request has been consumed by the IP Helper thread. Signed-off-by: Shashank Ram <rams@vmware.com> Acked-by: Yin Lin <linyi@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Removed double initialization on local variablesPaul Boca2016-04-211-2/+2
| | | | | | Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* datapath-windows: nuke port # argument in IP helperNithin Raju2015-11-251-7/+6
| | | | | | | | | | | | Port # doesn't make much sense since it has not been computed yet. Also, get rid of OVS_DEFAULT_PORT_NO and use OVS_DPPORT_NUMBER_INVALID instead. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Added specific pool tag for iphelper codeSorin Vinturis2015-03-261-34/+36
| | | | | | | | | | | All memory allocations within iphelper code have 'HSVO' pool tag. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/56 Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: cleanup DpInternal.hNithin Raju2014-11-201-5/+5
| | | | | | | | | | Getting rid of unused definitions in DpInternal.h. This is only the first round. There's scope for more cleanup. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* datapath-windows: Rename files.Samuel Ghinet2014-08-291-0/+1689
This patch includes the file renaming and accommodations needed for the file renaming to build the forwarding extension for Hyper-V. This patch is also a follow-up for the thread: http://openvswitch.org/pipermail/dev/2014-August/044005.html Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com> Co-authored-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>