VlansOverBondRecipe

class lnst.Recipes.ENRT.VlansOverBondRecipe.VlansOverBondRecipe(**kwargs)

Bases: PerfReversibleFlowMixin, VlanPingEvaluatorMixin, CommonHWSubConfigMixin, OffloadSubConfigMixin, BaremetalEnrtRecipe

This recipe implements Enrt testing for a network scenario that looks as follows

                      .--------.
        .-------------+ switch +--------.
        |         .---+        |        |
        |         |   '--------'        |
  .-----|---------|----.                |
  | .---'--.  .---'--. |             .--'---.
.-|-| eth0 |--| eth1 |-|-.   .-------| eth0 |------.
| | '------'  '------' | |   |       '------'      |
| |        bond0       | |   |      /   |    \     |
| '-------/--|--\------' |   | vlan0  vlan1  vlan2 |
|        /   |   \       |   | id=10  id=20  id=30 |
|   vlan0  vlan1  vlan2  |   |                     |
|   id=10  id=20  id=30  |   |                     |
|                        |   |                     |
|          host1         |   |        host2        |
'------------------------'   '---------------------'

The recipe provides additional recipe parameters to configure the bonding device.

Parameters:
  • bonding_mode – (mandatory test parameter) the bonding mode to be configured on the bond0 device

  • miimon_value – (mandatory test parameter) the miimon interval to be configured on the bond0 device

All sub configurations are included via Mixin classes.

The actual test machinery is implemented in the BaseEnrtRecipe class.

test_wide_configuration()

Test wide configuration for this recipe involves creating one bonding device on the first host. This device bonds two NICs matched by the recipe. The bonding mode and miimon interval is configured on the bonding device according to the recipe parameters. Then three VLAN (802.1Q) tunnels are created on top of the bonding device on the first host and on the matched NIC on the second host. The tunnels are configured with VLAN ids from vlan0_id, vlan1_id and vlan2_id params (by default: 10, 20, 30).

An IPv4 and IPv6 address is configured on each tunnel endpoint.

host1.vlan0 = 192.168.10.1/24 and fc00:0:0:1::1/64
host1.vlan1 = 192.168.20.1/24 and fc00:0:0:2::1/64
host1.vlan2 = 192.168.30.1/24 and fc00:0:0:3::1/64
host2.vlan0 = 192.168.10.2/24 and fc00:0:0:1::2/64
host2.vlan1 = 192.168.20.2/24 and fc00:0:0:2::2/64
host2.vlan2 = 192.168.30.2/24 and fc00:0:0:3::2/64
generate_test_wide_description(config: EnrtConfiguration)

Test wide description is extended with the configured VLAN tunnels, their IP addresses and the bonding device configuration.

generate_ping_endpoints(config)

The ping endpoints for this recipe are the matching VLAN tunnel endpoints of the hosts.

Returned as:

[PingEndpoints(host1.vlan0, host2.vlan0),
 PingEndpoints(host1.vlan1, host2.vlan1),
 PingEndpoints(host1.vlan2, host2.vlan2)]
generate_perf_endpoints(config: EnrtConfiguration) list[Collection[EndpointPair[IPEndpoint]]]

The perf endpoints for this recipe are the VLAN tunnel endpoints with VLAN id from parameter vlan_ids[0] (by default: 10):

host1.vlan0 and host2.vlan0

property offload_nics

The offload_nics property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:

host1.eth0, host1.eth1 and host2.eth0

For detailed explanation of this property see OffloadSubConfigMixin class and OffloadSubConfigMixin.offload_nics.

property mtu_hw_config_dev_list

The mtu_hw_config_dev_list property value for this scenario is a list of all configured VLAN tunnel devices and the underlying bonding or physical devices:

host1.bond0, host1.vlan0, host1.vlan1, host1.vlan2
host2.eth0, host2.vlan0, host2.vlan1, host2.vlan2

For detailed explanation of this property see MTUHWConfigMixin class and MTUHWConfigMixin.mtu_hw_config_dev_list.

property dev_interrupt_hw_config_dev_list

The dev_interrupt_hw_config_dev_list property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:

host1.eth0, host1.eth1 and host2.eth0

For detailed explanation of this property see DevInterruptHWConfigMixin class and DevInterruptHWConfigMixin.dev_interrupt_hw_config_dev_list.

property parallel_stream_qdisc_hw_config_dev_list

The parallel_stream_qdisc_hw_config_dev_list property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:

host1.eth0, host1.eth1 and host2.eth0

For detailed explanation of this property see ParallelStreamQDiscHWConfigMixin class and ParallelStreamQDiscHWConfigMixin.parallel_stream_qdisc_hw_config_dev_list.

property pause_frames_dev_list

The pause_frames_dev_list property value for this scenario is a list of the physical devices carrying data of the configured VLAN tunnels:

host1.eth0, host1.eth1 and host2.eth0

For detailed explanation of this property see PauseFramesHWConfigMixin and PauseFramesHWConfigMixin.pause_frames_dev_list.