sysinv: skip slave network configuration for dpdk interfaces

The only data interfaces that require a puppet network configuration are
those interfaces that require cooperation between the DPDK driver and
the Linux driver.  For now that list includes only the Mellanox devices.
The Linux device must be configured with the correct MTU value otherwise
the the DPDK driver cannot send/receive any packets above the default
MTU value (i.e., 1500 bytes).

The network configuration generated for those devices must not include
the "slave" attributes since the master device does not actually exist
in the Linux domain.  The master device exists only in the vswitch
domain.  Since slave devices are ignored by apply_network_config.sh they
are not brought up as part of the node initialization and therefore
their MTU value is not set.

By excluding the slave attributes from the network configuration the
apply_network_config.sh script will recognize these interfaces as
regular Ethernet interfaces and will bring them up/down as needed.  This
will ensure that the MTU value is set approprietly.

Closes-Bug: 1803714

Change-Id: I1dcf659c7c8828d0aa4bf2ebd0af96dc71bf14a0
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
This commit is contained in:
Allain Legacy 2018-11-16 09:05:57 -06:00
parent 3d99331759
commit 746285981b
1 changed files with 9 additions and 3 deletions

View File

@ -807,9 +807,15 @@ def get_ethernet_network_config(context, iface, config):
if is_bridged_interface(context, iface):
options['BRIDGE'] = get_bridge_interface_name(context, iface)
elif is_slave_interface(context, iface):
options['SLAVE'] = 'yes'
options['MASTER'] = get_master_interface(context, iface)
options['PROMISC'] = 'yes'
if not is_data_interface(context, iface):
# Data interfaces that require a network configuration are not
# candidates for bonding. They exist because their DPDK drivers
# rely on the Linux device driver to setup some or all functions
# on the device (e.g., the Mellanox DPDK driver relies on the
# Linux driver to set the proper MTU value).
options['SLAVE'] = 'yes'
options['MASTER'] = get_master_interface(context, iface)
options['PROMISC'] = 'yes'
elif interface_class == constants.INTERFACE_CLASS_PCI_SRIOV:
if not is_a_mellanox_cx3_device(context, iface):
# CX3 device can only use kernel module options to enable vfs