diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-02-08 13:58:27 +0000 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2019-02-08 15:06:30 +0000 |
commit | 57d85348f358c249b18be717c08be014f96bd8e9 (patch) | |
tree | 8690d11cdc49a6b5954f104bea0c73669f37deee | |
parent | c567d1e831a32f8059f66986aa9b589202277713 (diff) |
FIX: AVF API
Change-Id: If755c06935a525c7a312e63f32f6035f08fdb893
Signed-off-by: Peter Mikus <pmikus@cisco.com>
4 files changed, 12 insertions, 5 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index 8e1892392d..a73b6df8f3 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -991,21 +991,27 @@ class InterfaceUtil(object): Topology.update_interface_mac_address(node, if_key, ifc_mac) @staticmethod - def vpp_create_avf_interface(node, vf_pci_addr): + def vpp_create_avf_interface(node, vf_pci_addr, num_rx_queues=None): """Create AVF interface on VPP node. :param node: DUT node from topology. :param vf_pci_addr: Virtual Function PCI address. + :param num_rx_queues: Number of RX queues. :type node: dict :type vf_pci_addr: str + :type num_rx_queues: int :returns: Interface key (name) in topology. :rtype: str :raises RuntimeError: If it is not possible to create AVF interface on the node. """ + num_rx_queues = 'num-rx-queues {num_rx_queues}'\ + .format(num_rx_queues=num_rx_queues) if num_rx_queues else '' + with VatTerminal(node, json_param=False) as vat: vat.vat_terminal_exec_cmd_from_template('create_avf_interface.vat', - vf_pci_addr=vf_pci_addr) + vf_pci_addr=vf_pci_addr, + num_rx_queues=num_rx_queues) output = vat.vat_stdout if output is not None: diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index be30d3706c..73041081ae 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -129,9 +129,9 @@ | | | ${if2_pci}= | Get Interface PCI Addr | ${nodes['${dut}']} | | | ... | ${${dut}_if2_vf0} | | | ${dut_eth_vf_if1}= | VPP Create AVF Interface | ${nodes['${dut}']} -| | | ... | ${if1_pci} +| | | ... | ${if1_pci} | ${rxq_count_int} | | | ${dut_eth_vf_if2}= | VPP Create AVF Interface | ${nodes['${dut}']} -| | | ... | ${if2_pci} +| | | ... | ${if2_pci} | ${rxq_count_int} | | | Set Test Variable | ${${dut}_if1} | ${dut_eth_vf_if1} | | | Set Test Variable | ${${dut}_if2} | ${dut_eth_vf_if2} | | Set interfaces in path up diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index d1ec6d2a03..15fdfaaf4b 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -54,6 +54,7 @@ | | | ... | ${root}/usr/bin/vppctl:/usr/bin/vppctl | | | ... | ${root}/usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ | | | ... | ${root}/usr/share/vpp/:/usr/share/vpp/ +| | | ... | ${root}/usr/lib/vpp_plugins/:/usr/lib/vpp_plugins/ | | | ${nf_cpus}= | Set Variable | ${None} | | | ${nf_cpus}= | Run Keyword Unless | ${nested} | | | ... | Create network function CPU list | ${dut} diff --git a/resources/templates/vat/create_avf_interface.vat b/resources/templates/vat/create_avf_interface.vat index b7ce79a98f..ca6e747d26 100644 --- a/resources/templates/vat/create_avf_interface.vat +++ b/resources/templates/vat/create_avf_interface.vat @@ -1 +1 @@ -avf_create {vf_pci_addr} +avf_create {vf_pci_addr} {num_rx_queues} |