datapath-windows: cleanup InitHvVportCommon()
authorNithin Raju <nithin@vmware.com>
Wed, 25 Nov 2015 20:00:54 +0000 (12:00 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 25 Nov 2015 21:54:25 +0000 (13:54 -0800)
commit958227c655d41821843e8d5d2b636f586b0cb5b4
treefc59103d3951e3f60b87a17ad2703dcd8a970fd3
parent13165df937f24b91fc5b3c31be2f7b424eb12104
datapath-windows: cleanup InitHvVportCommon()

The workflow being implemented is that, we need to assign a special
name to the internal and external NICs, and it it not necessary to do
that from InitHvVportCommon(). The purpose of InitHvVportCommon() is to
insert the vport into the hash tables and update the switch context.

We special case the name assignment in HvCreateNIC() for
internal and external NICs. That seems more meaningful.

Also, reused HvCreatePort() to allocate a Vport for each of the external
NICs with NicIndex != 0. Due to this HvCreatePort() now takes 'nicIndex'
as an additional parameter.

Renamed InitHvVportCommon() to UpdateSwitchCtxWithVport().

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/ovsext/Oid.c
datapath-windows/ovsext/Vport.c
datapath-windows/ovsext/Vport.h