exec_cmd_no_error(node, cmd, sudo=True)
@staticmethod
- def init_avf_interface(node, ifc_key, numvfs=1, topology_type='L2'):
+ def init_avf_interface(node, ifc_key, numvfs=1, osi_layer='L2'):
"""Init PCI device by creating VFs and bind them to vfio-pci for AVF
driver testing on DUT.
:param node: DUT node.
:param ifc_key: Interface key from topology file.
:param numvfs: Number of VFs to initialize, 0 - disable the VFs.
- :param topology_type: Topology type.
+ :param osi_layer: OSI Layer type to initialize TG with.
+ Default value "L2" sets linux interface spoof off.
:type node: dict
:type ifc_key: str
:type numvfs: int
- :type topology_type: str
+ :type osi_layer: str
:returns: Virtual Function topology interface keys.
:rtype: list
"""
format(pci=pf_pci_addr)
InterfaceUtil.set_linux_interface_trust_on(node, pf_dev,
vf_id=vf_id)
- if topology_type == 'L2':
+ if osi_layer == 'L2':
InterfaceUtil.set_linux_interface_spoof_off(node, pf_dev,
vf_id=vf_id)
InterfaceUtil.set_linux_interface_mac(node, pf_dev, vf_mac_addr,