From 7fc0ee7f65fbbced6e987f8bfd927a595b7ff7ee Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 13 Oct 2021 19:16:07 +0200 Subject: classify: add API to retrieve punt ACL tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: feature Change-Id: Ica3e60836c0f26518ba2c238a8c03ce3648ea69b Signed-off-by: Benoît Ganne --- test/test_classifier.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/test_classifier.py b/test/test_classifier.py index 74851f92377..9f0fdbf587a 100644 --- a/test/test_classifier.py +++ b/test/test_classifier.py @@ -915,10 +915,20 @@ class TestClassifierPunt(TestClassifier): proto=socket.IPPROTO_UDP, src_port=sport)) self.send_and_expect_only(self.pg0, pkts, self.pg1) + # test dump api: ip4 is set, ip6 is not + r = self.vapi.punt_acl_get() + self.assertEqual(r.ip4_table_index, table_index) + self.assertEqual(r.ip6_table_index, 0xffffffff) + # cleanup self.acl_active_table = '' self.vapi.punt_acl_add_del(ip4_table_index=table_index, is_add=0) + # test dump api: nothing set + r = self.vapi.punt_acl_get() + self.assertEqual(r.ip4_table_index, 0xffffffff) + self.assertEqual(r.ip6_table_index, 0xffffffff) + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner) -- cgit 1.2.3-korg