X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_neighbor.py;h=f01f536770392d121ad2fd00d10aa002c9f3aaf9;hb=c8352bc43dfa02707e8806e1ae5b310bbdb4d302;hp=9d91f031571ba866b1c648b346811cac9f561403;hpb=2ce8bd9621902b8078fdcd9a95fd366f24d56ab3;p=vpp.git diff --git a/test/test_neighbor.py b/test/test_neighbor.py index 9d91f031571..f01f5367703 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -1316,6 +1316,37 @@ class ARPTestCase(VppTestCase): self.pg1.sw_if_index, self.pg1.remote_hosts[2].ip4)) + def test_arp_incomplete(self): + + # + # ensure that we throttle the ARP requests + # + self.pg0.generate_remote_hosts(2) + + ip_10_0_0_1 = VppIpRoute(self, "10.0.0.1", 32, + [VppRoutePath(self.pg0.remote_hosts[1].ip4, + self.pg0.sw_if_index, + labels=[55])]) + ip_10_0_0_1.add_vpp_config() + + p1 = (Ether(dst=self.pg1.local_mac, + src=self.pg1.remote_mac) / + IP(src=self.pg1.remote_ip4, + dst="10.0.0.1") / + UDP(sport=1234, dport=1234) / + Raw()) + + self.pg1.add_stream(p1 * 257) + self.pg_enable_capture(self.pg_interfaces) + self.pg_start() + rx = self.pg0._get_capture(1) + + # + # how many we get is going to be dependent on the time for packet + # processing but it should be small + # + self.assertTrue(len(rx) < 64) + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)