FIX: Memif API 25/17425/1
authorPeter Mikus <pmikus@cisco.com>
Fri, 8 Feb 2019 13:58:27 +0000 (13:58 +0000)
committerPeter Mikus <pmikus@cisco.com>
Fri, 8 Feb 2019 14:01:19 +0000 (14:01 +0000)
Change-Id: If755c06935a525c7a312e63f32f6035f08fdb893
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/python/InterfaceUtil.py
resources/libraries/robot/performance/performance_configuration.robot
resources/templates/vat/create_avf_interface.vat

index 8e18923..a73b6df 100644 (file)
@@ -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:
index be30d37..7304108 100644 (file)
 | | | ${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

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.