From a09c1ff5b6ae535932b4fc9477ffc4e39748ca62 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 4 Feb 2019 01:10:30 -0800 Subject: IPSEC: SPD counters in the stats sgement - return the stats_index of each SPD in the create API call - no ip_any in the API as this creates 2 SPD entries. client must add both v4 and v6 explicitly - only one pool of SPD entries (rhter than one per-SPD) to support this - no packets/bytes in the dump API. Polling the stats segment is much more efficient (if the SA lifetime is based on packet/bytes) - emit the policy index in the packet trace and CLI commands. Change-Id: I7eaf52c9d0495fa24450facf55229941279b8569 Signed-off-by: Neale Ranns --- test/template_ipsec.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/template_ipsec.py') diff --git a/test/template_ipsec.py b/test/template_ipsec.py index 7888a6788ab..77461d4397f 100644 --- a/test/template_ipsec.py +++ b/test/template_ipsec.py @@ -380,6 +380,11 @@ class IpsecTun4Tests(object): self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show ipsec")) + if (hasattr(p, "spd_policy_in_any")): + pkts = p.spd_policy_in_any.get_stats()['packets'] + self.assertEqual(pkts, count, + "incorrect SPD any policy: expected %d != %d" % + (count, pkts)) self.assert_packet_counter_equal(self.tun4_encrypt_node_name, count) self.assert_packet_counter_equal(self.tun4_decrypt_node_name, count) -- cgit 1.2.3-korg