classify: add API to retrieve punt ACL tables

Type: feature

Change-Id: Ica3e60836c0f26518ba2c238a8c03ce3648ea69b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
This commit is contained in:
Benoît Ganne
2021-10-13 19:16:07 +02:00
committed by Beno�t Ganne
parent 26fec718f2
commit 7fc0ee7f65
3 changed files with 55 additions and 0 deletions

View File

@ -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)