[ovs-git] [openvswitch/ovs] 2ba811: datapath-windows: fixes in OvsGetExtInfoIoctl()

GitHub noreply at github.com
Thu Nov 20 15:15:01 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 2ba811323416042edac6792845bdd35256fc53c7
      https://github.com/openvswitch/ovs/commit/2ba811323416042edac6792845bdd35256fc53c7
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Vport.c

  Log Message:
  -----------
  datapath-windows: fixes in OvsGetExtInfoIoctl()

A few fixes around locking.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: 70e562509a4df0a46012999845cb0b96b676e602
      https://github.com/openvswitch/ovs/commit/70e562509a4df0a46012999845cb0b96b676e602
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Datapath.c
    M datapath-windows/ovsext/Vport.c
    M datapath-windows/ovsext/Vport.h

  Log Message:
  -----------
  datapath-windows: add WCHAR version of OvsFindVportByHvName()

In this patch, we rename the existing OvsFindVportByHvName() to
OvsFindVportByHvNameA() to indicate that the input string is an ASCII
string. We also define a OvsFindVportByHvNameW() that takes as input a
WCHAR string.

This will be used later in HvCreatPort() to check for ports with
duplicate names.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: 0b931c1cb2e90f5f75093ece8d06e1a931fdc94c
      https://github.com/openvswitch/ovs/commit/0b931c1cb2e90f5f75093ece8d06e1a931fdc94c
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Switch.h

  Log Message:
  -----------
  datapath-windows: clarify 'portIdHashArray' in the swithc context

In this patch, we update the documentation for 'portIdHashArray' to
indicate that a vport would exist in this hash table if and only if it
also exists on the Hyper-V switch.

This functionality to implement this semantic will follow in subsequent
patches.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: c22f284b4b8d714bf54305d13a5a26eba12e4afe
      https://github.com/openvswitch/ovs/commit/c22f284b4b8d714bf54305d13a5a26eba12e4afe
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Datapath.c
    M datapath-windows/ovsext/Vport.c
    M datapath-windows/ovsext/Vport.h

  Log Message:
  -----------
  datapath-windows: Changes to OvsRemoveAndDeleteVport()

In this patch, we add changes to OvsRemoveAndDeleteVport() to allow the
caller to specify if a vport is being deleted because it got deleted on
Hyper-V or if it got deleted from OVS userspace.

The reason we need to make the distinction is to be able to delete the
vport from the relevant hash tables.

If a port has been deleted from all the hash tables ie. has been deleted
from Hyper-V as well as OVS userspace, it gets deallocated.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: 827e07be2e969354267f8383cc708b1edbe4dd49
      https://github.com/openvswitch/ovs/commit/827e07be2e969354267f8383cc708b1edbe4dd49
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Vport.c
    M datapath-windows/ovsext/Vport.h

  Log Message:
  -----------
  datapath-windows: Changes to InitOvsVportCommon()

If a Hyper-V port (for which there exists an OVS port), gets deleted and
re-added, we'll call into InitOvsVportCommon() for the port to insert
the port into the 'portIdHashArray' as well as do a few other
initialization in the switch ocntext.

We should not be incrementing 'numHvPorts' at this point since this
vport has been counted before when it was first allocated. To account
for this, we add a new parameter to InitOvsVportCommon(). The arguments
passed by some of the callers are not 100% correct, and will be fixed in
future commit in the series.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: 8ea43bad3d4bf56d29c1390a9c7f5c8f9cb4e252
      https://github.com/openvswitch/ovs/commit/8ea43bad3d4bf56d29c1390a9c7f5c8f9cb4e252
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Datapath.c
    M datapath-windows/ovsext/Netlink/NetlinkError.h
    M datapath-windows/ovsext/Vxlan.c
    M datapath-windows/ovsext/Vxlan.h

  Log Message:
  -----------
  datapath-windows: Change return type of OvsInitVxlanTunnel()

OvsInitVxlanTunnel() need not return a NL_ERROR. In this patch, we
change it to NTSTATUS, and also update the mapping function that maps a
NTSTATUS to NL_ERROR.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


  Commit: 25f44d58248cf4ef46303cf3c35fbd28a493b266
      https://github.com/openvswitch/ovs/commit/25f44d58248cf4ef46303cf3c35fbd28a493b266
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2014-11-20 (Thu, 20 Nov 2014)

  Changed paths:
    M datapath-windows/ovsext/Vport.c

  Log Message:
  -----------
  datapath-windows: Fixes in HvCreatePort() to re-add a port

In this patch, we update HvCreatePort() to be able to re-add a Hyper-V
port. Specifically, we handle the case where the port had also been
added by OVS userspace, so that when the port was previously deleted
from Hyper-V, we did not deallocate the port.

The key to a vport is its name. We lookup the list of vports both in the
'portIdHashArray' as well as 'portNoHashArray' to make sure that we
don't have a port with the same name.

Validation:
- deleted an re-added a port with and without the corresponding OVS port
existing
- deleted, changed the name of a port, and re-added it back with and
without the corresponding OVS port existing.
- uninstall was succcessful. No asserts hit.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/f6861bef4f76...25f44d58248c


More information about the git mailing list