[ovs-dev] [PATCH 07/14] datapath-windows: Rename switch context's nameHashArray and vport's nameLink

Nithin Raju nithin at vmware.com
Sat Oct 4 00:24:48 UTC 2014


On Sep 30, 2014, at 7:51 AM, Samuel Ghinet <sghinet at cloudbasesolutions.com> wrote:

> The field nameLink of the OVS_VPORT_ENTRY is the link within the
> OVS_SWITCH_CONTEXT's hash array of vports nameHashArray, hashed by the
> ovsName field of the OVS_VPORT_ENTRY.
> 
> Later on, the friendly name of the hyper-v switch port will need to be
> set from userspace using WMI. This will require that the hyper-v switch
> port friendly name be set to the exact string value as the ovs
> (datapath) port name set from netlink command vport add.
> 
> The vport will need to differentiate between the ovs (datapath) port
> name and hyper-v switch port friendly name, because they may differ in
> erroneous scenarios, or state differences between the hyper-v switch
> port and the ovs (datapath) port. This may happen if the vport was
> created by the netlink command vport add, but the VM disconnected (i.e.
> the hyper-v switch port was later deleted).
> 
> Storing another field in vport, "portFriendlyName" would normally
> make the current switchContext->nameHashArray and vport->nameLink
> confusing since the "name"-s may be understood to mean the hyper-v
> switch port friendly name, or the hyper-v switch port name, when it
> actually refers to the ovs (datapath) port name.
> 
> Hence, the variable nameHashArray is renamed to ovsPortNameHashArray,
> while the nameLink is renamed to ovsPortNameLink. This change will make
> a clearer connection between these and the vport field "ovsName" to
> which they revolve around.
> 
> Signed-off-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>

hi Alin,
I don't fully understand the motivation to keep separate names:
ovsPortName and portFriendlyName. Ideally, they should be the same. Any attempt to change the 'portFriendlyName' while ovsPortName != "" should be failed, IMO. We should not allow these two names to go out of sync.

If there's a good reason to keep 2 separate names, this change looks good.

Acked-by: Nithin Raju <nithin at vmware.com>

-- Nithin


More information about the dev mailing list