diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2018-08-29 10:23:58 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-08-30 17:43:48 +0000 |
commit | c8352bc43dfa02707e8806e1ae5b310bbdb4d302 (patch) | |
tree | 2db2f1a8772869ad350f53fbb04a124d8f71fe70 /test/test_neighbor.py | |
parent | 2ce8bd9621902b8078fdcd9a95fd366f24d56ab3 (diff) |
Refactor the ARP throttle into a common type so it can be reused
Change-Id: Ic7f7af983d5b6d756748023aa0c650f53e9285cf
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'test/test_neighbor.py')
-rw-r--r-- | test/test_neighbor.py | 31 |
1 files changed, 31 insertions, 0 deletions
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) |