summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/TunnelFilter.c
Commit message (Collapse)AuthorAgeFilesLines
* datapath-windows: Fix misspelling in comment.Alin Serdean2017-08-021-1/+1
| | | | | | | | Found by inspection. 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 function annotations for OvsTunnelFilterCancelIrpAlin Serdean2017-08-021-2/+1
| | | | | | | | | | The function should be aware that it is cancel routine. This patch adds annotation for that. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Shashank Ram <rams@vmware.com>
* windows: Change driver and MSI company name to LFAlin Serdean2017-01-261-1/+1
| | | | | | | | | | | | | Until now we used 'Open vSwitch' as the company/organization name. The project is now under The Linux Foundation ownership. This patch updates the MSI and driver attributes to reflect that ownership. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Ben Pfaff <blp@ovn.org> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* datapath-windows: Removed double initialization on local variablesPaul Boca2016-04-211-6/+6
| | | | | | 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: Tunnel filter initialization checkSorin Vinturis2015-09-041-23/+48
| | | | | | | | | | Verify if the tunnel filter is initialized before submitting requests. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/100 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: New tag for tunnel filter pool allocationsSorin Vinturis2015-09-041-1/+3
| | | | | | | | All memory allocations within tunnel filter code have 'WSVO' pool tag. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Support for IRP cancelling mechanismSorin Vinturis2015-08-311-18/+180
| | | | | | | | | | | | | | | | Under certain circumstances, we might need to cancel a pending IRP that has been submitted and not yet responded. This might occur when the request takes too long to complete or when the process which initiated the request terminated, leaving the request outstanding. This patch provides this missing piece by adding support for IRP cancelling mechanism. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/95 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Process tunnel filter requests iterativelySorin Vinturis2015-08-311-70/+27
| | | | | | | | | | In order to support IRP cancelling mechanism for pending IRPs, all tunnel filter requests, VXLAN create/delete tunnel, need to be processed iteratively. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Enable failure after restarting extensionSorin Vinturis2015-08-281-12/+16
| | | | | | | | | | | | | | | If the extension was previously enabled and running, after issuing a restart, stop+start, the extension fails to be enabled. This happens because the extension's DeviceObject is not yet initialized before the FilterAttach routine is called. This patch addresses this issue. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/96 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Avoid BSOD when cleaning up a tunnel vportSorin Vinturis2015-07-281-1/+0
| | | | | | | | | | | | | | If an error appears when creating a tunnel vport the cleanup is performed twice, which causes the tunnel vport to be released also twice and generate a BSOD. This patch modifies the tunnel filter cleanup logic to avoid this issue. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/97 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Fixed spelling errors in OVSSorin Vinturis2015-07-161-11/+11
| | | | | | | Solved some spelling errors observed in the datapath code. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Return success for already existing WFP objectsSorin Vinturis2015-06-231-2/+11
| | | | | | | | | | | | | There are cases when the WFP callout or sublayer, being persistent objects, already exists when we try to register the OVS callout. In this cases, when trying to add again these WFP objects the return code is STATUS_FWP_ALREADY_EXISTS, which we are interpreting as an error. This is incorrect and this patch changes that. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/84 Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Document OVS tunnel filter calloutSorin Vinturis2015-05-271-4/+221
| | | | | | Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Support for custom VXLAN tunnel portSorin Vinturis2015-05-271-156/+725
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel datapath supports only port 4789 for VXLAN tunnel creation. Added support in order to allow for the VXLAN tunnel port to be configurable to any port number set by the userspace. The patch also checks to see if an existing WFP filter, for the necessary UDP tunnel port, is already created before adding a new one. This is a double check, because currently the userspace also verifies this, but it is necessary to avoid future issues. Custom VXLAN tunnel port requires the addition of a new WFP filter with the new UDP tunnel port. The creation of a new WFP filter is triggered in OvsInitVxlanTunnel function and the removal of the WFP filter in OvsCleanupVxlanTunnel function. But the latter functions are running at IRQL = DISPATCH_LEVEL, due to the NDIS RW lock acquisition, and all WFP calls must be running at IRQL = PASSIVE_LEVEL. This is why I have created a system thread which records all filter addition/removal requests into a list for later processing by the system thread. The ThreadStart routine processes all received requests at IRQL = PASSIVE_LEVEL, which is the required IRQL for the necessary WFP calls for adding/removal of the WFP filters. The WFP filter for the default VXLAN port 4789 is not added anymore at filter attach. All WFP filters for the tunnel ports are added when the tunnel ports are initialized and are removed at cleanup. WFP operation status is then reported to userspace. It is necessary that OvsTunnelFilterUninitialize function is called after OvsClearAllSwitchVports in order to allow for the added WFP filters to be removed. OvsTunnelFilterUninitialize function closes the global engine handle used by most of the WFP calls, including filter removal. 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/66 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Enable extension after rrestartSorin Vinturis2015-04-291-22/+103
| | | | | | | | | | | | | | | | | The extension failed to be activated during booting due to the failure to initialize tunnel filter. This happened because the Base Filtering Engine (BFE) is not started and no session to the engine could be acquired. The solution for this was to registered a BFE notification callback that is called whenever the BFE's state changes. Only if the BFE's state is running the tunnel filter is initialized. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/77 Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
* datapath-windows: Updated WFP system provider handlingSorin Vinturis2015-03-241-5/+94
| | | | | | | | | | | | | | | | If the Base Filtering Engine (BFE) is not started, the WFP system provider failed to be added because no session to the engine could be acquired. The solution for this was to registered a BFE notification callback that is called whenever the BFE's state changes. Only if the BFE's state is running the WFP system provider is added. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/65 Acked-by: Eitan Eliahu <eliahue@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Add a WFP system providerSorin Vinturis2015-01-061-16/+157
| | | | | | | | | | | | This patch was enforced by the WHCK logo testing. In order to pass the Windows Filtering Platform tests we need to add a persistent system provider. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/65 Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Release WFP allocated objectsSorin Vinturis2015-01-011-2/+61
| | | | | | | | | | | | | | | | | | | | Filter and sublayer WFP objects are created when the filter attach routine is called and the tunnel filter is initialized, and they are released in the uninitialize part. But the release part is done indirectly, through the FwpmEngineClose function call which releases the latter objects when the tunnel is uninitialized at filter detach. We need to properly release the created objects and not rely that FwpmEngineClose function does this for us, because if we decide to keep the engine opened passed the filter detach those objects will continue to exist. Even though the FwpmEngineClose function releases the latter objects, we still need this and the reason will became obvious in the next patch. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath-windows: Rename files.Samuel Ghinet2014-08-291-0/+343
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>