@@ -671,7 +671,7 @@ class TestChecksumOffload(TestCase):
self.tester.send_expect("scapy", ">>>")
self.checksum_enablehw(self.dut_ports[0])
self.dut.send_expect("start", "testpmd>")
-
+ self.pmdout.wait_link_status_up(self.dut_ports[0])
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
@@ -701,7 +701,7 @@ class TestChecksumOffload(TestCase):
def test_hardware_checksum_check_ip_tx(self):
self.checksum_enablehw(self.dut_ports[0])
self.dut.send_expect("start", "testpmd>")
-
+ self.pmdout.wait_link_status_up(self.dut_ports[0])
verification_errors: List[VerifyFailure] = []
iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0]))
@@ -179,6 +179,7 @@ class TestFlowClassifySoftnic(TestCase):
Sent pkts that read from the pcap_file.
Return the sniff pkts.
"""
+ self.pmdout.wait_link_status_up(self.dut_ports[0])
tx_port = self.tester.get_local_port(self.dut_ports[from_port%self.port_num])
rx_port = self.tester.get_local_port(self.dut_ports[to_port%self.port_num])
@@ -283,6 +284,7 @@ class TestFlowClassifySoftnic(TestCase):
"""
Sends continuous packets.
"""
+ self.pmdout.wait_link_status_up(self.dut_ports[0])
self.tester.scapy_foreground()
time.sleep(2)
if src_dst == "src":
@@ -51,7 +51,6 @@ from scapy.layers.sctp import SCTP, SCTPChunkData
from scapy.route import *
from scapy.sendrecv import sniff
from scapy.utils import rdpcap, socket, struct, wrpcap
-
import framework.utils as utils
from framework.packet import IncreaseIP, IncreaseIPv6
from framework.pmd_output import PmdOutput
@@ -499,6 +498,7 @@ class TestNvgre(TestCase):
config.outer_mac_dst = self.dut_rx_port_mac
config.create_pcap()
self.dut.send_expect("start", "testpmd>", 10)
+ self.pmdout.wait_link_status_up(self.dut_rx_port)
config.send_pcap()
# check whether detect nvgre type
out = self.dut.get_session_output()
@@ -523,6 +523,7 @@ class TestNvgre(TestCase):
# send nvgre packet
config.create_pcap()
self.dut.send_expect("start", "testpmd>", 10)
+ self.pmdout.wait_link_status_up(self.dut_rx_port)
config.send_pcap()
out = self.dut.get_session_output()
print(out)
@@ -595,7 +596,7 @@ class TestNvgre(TestCase):
self.logger.info("nvgre packet %s" % arg_str)
out = self.dut.send_expect("start", "testpmd>", 10)
-
+ self.pmdout.wait_link_status_up(self.dut_rx_port)
# create pcap file with supplied arguments
config = NvgreTestConfig(self, **kwargs)
config.outer_mac_dst = self.dut_rx_port_mac
@@ -90,6 +90,7 @@ class TestVlan(TestCase):
"""
Send $num of packets to portid, if vid is -1, it means send a packet which does not include a vlan id.
"""
+ self.pmdout.wait_link_status_up(dutRxPortId)
# The package stream : testTxPort->dutRxPort->dutTxport->testRxPort
port = self.tester.get_local_port(dutRxPortId)
self.txItf = self.tester.get_interface(port)
@@ -106,7 +106,7 @@ class TestVlanEthertypeConfig(TestCase):
"""
if vid is -1, it means send pakcage not include vlan id.
"""
-
+ self.pmdout.wait_link_status_up(dutRxPortId)
self.tpid_ori_file = "/tmp/tpid_ori.pcap"
self.tpid_new_file = "/tmp/tpid_new.pcap"
self.tester.send_expect("rm -rf /tmp/tpid_ori.pcap", "# ")
@@ -472,8 +472,8 @@ class TestVxlan(TestCase):
config.outer_mac_dst = self.dut_port_mac
config.create_pcap()
self.dut.send_expect("start", "testpmd>", 10)
+ self.pmdout.wait_link_status_up(self.dut_port)
config.send_pcap(self.tester_iface)
-
# check whether detect vxlan type
out = self.dut.get_session_output(timeout=2)
print(out)
@@ -572,6 +572,7 @@ class TestVxlan(TestCase):
# send vxlan packet
config.create_pcap()
self.dut.send_expect("start", "testpmd>", 10)
+ self.pmdout.wait_link_status_up(self.dut_port)
config.send_pcap(self.tester_iface)
out = self.dut.get_session_output(timeout=2)
print(out)
@@ -606,7 +607,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set verbose 1", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
# check normal packet
self.send_and_detect(outer_udp_dst=1234)
# check vxlan + UDP inner packet
@@ -642,7 +643,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set verbose 1", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
# check normal ipv6 packet
self.send_and_detect(outer_ip6_src="FE80:0:0:0:0:0:0:0",
outer_ip6_dst="FE80:0:0:0:0:0:0:1",
@@ -692,7 +693,7 @@ class TestVxlan(TestCase):
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
# check normal packet + ip checksum invalid
self.send_and_check(outer_ip_invalid=1, outer_udp_dst=1234)
# check vxlan packet + inner ip checksum invalid
@@ -754,6 +755,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set fwd csum", "testpmd>", 10)
self.csum_set_type('outer-ip', self.recv_port)
self.csum_set_type('udp', self.recv_port)
+ self.csum_set_type('outer-udp', self.recv_port)
self.csum_set_type('tcp', self.recv_port)
self.csum_set_type('sctp', self.recv_port)
self.dut.send_expect("csum parse-tunnel on %d" %
@@ -761,7 +763,7 @@ class TestVxlan(TestCase):
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
# check normal ipv6 packet
self.send_and_check(outer_ip6_src="FE80:0:0:0:0:0:0:0",
outer_ip6_dst="FE80:0:0:0:0:0:0:1")
@@ -821,7 +823,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set verbose 1", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
config = VxlanTestConfig(self)
config_vlan = VxlanTestConfig(self, inner_vlan=1)
config.outer_mac_dst = self.dut_port_mac
@@ -892,6 +894,7 @@ class TestVxlan(TestCase):
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
+ self.pmdout.wait_link_status_up(self.dut_port)
rule = 'flow create {} ingress pattern eth / ipv4 / udp / vxlan vni is {} / eth dst is {} / end actions pf ' \
'/ queue index {} / end'.format(self.dut_port,
config.vni,
@@ -1048,7 +1051,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set fwd io", "testpmd>", 10)
self.dut.send_expect("start", "testpmd>", 10)
-
+ self.pmdout.wait_link_status_up(self.dut_port)
if BIDIRECT:
wirespeed = self.wirespeed(self.nic, PACKET_LEN, 2)
else:
@@ -1131,6 +1134,7 @@ class TestVxlan(TestCase):
self.dut.send_expect("set fwd csum", "testpmd>", 10)
self.enable_vxlan(self.dut_port)
self.enable_vxlan(self.recv_port)
+ self.pmdout.wait_link_status_up(self.dut_port)
# redirect flow to another queue by tunnel filter
rule_config = {