[controller] Cleanup 'direct' VNIC semantics, preparing for offloads
Before this patch, the 'direct' VNIC type was closely associated with the
hw_veb VIF type. Upstream OpenStack moved towards using the VNIC type to
indicate offloading for the 'ovs' VIF type. It's therefore possible to
specify that the combination of 'vrouter' VIF type, 'direct' VNIC type and
no specified provider network would indicate that an offloaded VM port
is requested.
This patch removes the check for the hard association and allows the
cloud to create ports with that specific combination. Note that Nova
and vrouter-port-control still require updates in order to hook in the
accelerated ports. A future patch is intended to address that.
* src/config/api-server/vnc_cfg_types.py:
If a provider network is supplied and 'direct' VNIC type is requested,
the unmodified code path is used. Otherwise, a 'vrouter' VIF type is
requested with the offloaded VNIC type.
* src/vnsw/agent/oper/vm_interface_config.cc:
Only use the VM_SRIOV interface if the VIF type is 'hw_veb' and the
VNIC type is 'direct'. Otherwise, a standard vrouter interface is
used.
* src/vnsw/agent/test/test_util.cc:
Unit test has been updated.
Change-Id: Idee90abad334a00f2284ba5494f16beac2b0424e
Closes-Bug: #1766925
Signed-off-by: Jan Gutter <email address hidden>
Reviewed: https:/ /review. opencontrail. org/42478 github. com/Juniper/ contrail- controller/ commit/ 60dca638de96a52 24bb40e85e36228 af3b6a60e1
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R4.1
commit 60dca638de96a52 24bb40e85e36228 af3b6a60e1
Author: Jan Gutter <email address hidden>
Date: Mon Apr 23 10:32:42 2018 +0200
[controller] Cleanup 'direct' VNIC semantics, preparing for offloads
Before this patch, the 'direct' VNIC type was closely associated with the
hw_veb VIF type. Upstream OpenStack moved towards using the VNIC type to
indicate offloading for the 'ovs' VIF type. It's therefore possible to
specify that the combination of 'vrouter' VIF type, 'direct' VNIC type and
no specified provider network would indicate that an offloaded VM port
is requested.
This patch removes the check for the hard association and allows the port-control still require updates in order to hook in the
cloud to create ports with that specific combination. Note that Nova
and vrouter-
accelerated ports. A future patch is intended to address that.
* src/config/ api-server/ vnc_cfg_ types.py:
If a provider network is supplied and 'direct' VNIC type is requested,
the unmodified code path is used. Otherwise, a 'vrouter' VIF type is
requested with the offloaded VNIC type.
* src/vnsw/ agent/oper/ vm_interface_ config. cc:
Only use the VM_SRIOV interface if the VIF type is 'hw_veb' and the
VNIC type is 'direct'. Otherwise, a standard vrouter interface is
used.
* src/vnsw/ agent/test/ test_util. cc:
Unit test has been updated.
Change-Id: Idee90abad334a0 0f2284ba5494f16 beac2b0424e
Closes-Bug: #1766925
Signed-off-by: Jan Gutter <email address hidden>