X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=df45e39560ca033e53977d9ef886a50c079b8e35;hp=a1a9b739e0be0f59b574119d69edf0109e44aff0;hb=5e6145a4260ffce1c302e94b9b241851f90838e1;hpb=5221220aa5a893e93d78ba31f84b0ad4d6245ec3 diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index a1a9b739e0..df45e39560 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1325,18 +1325,20 @@ class InterfaceUtil(object): 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, traffic_type='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 traffic_type: Expected type of traffic, affects spoofing. + Default value "L2" sets linux interface spoof off. + Other values do not do that. :type node: dict :type ifc_key: str :type numvfs: int - :type topology_type: str + :type traffic_type: str :returns: Virtual Function topology interface keys. :rtype: list """ @@ -1375,7 +1377,7 @@ class InterfaceUtil(object): format(pci=pf_pci_addr) InterfaceUtil.set_linux_interface_trust_on(node, pf_dev, vf_id=vf_id) - if topology_type == 'L2': + if traffic_type == '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,