From a71ed7869fa59884a61356a997cea81344c19dde Mon Sep 17 00:00:00 2001 From: Brian Russell Date: Wed, 27 Jan 2021 11:34:33 +0000 Subject: policer: add counters Add counters to the policer against each of the 3 possible results: conform, exceed and violate. Type: improvement Signed-off-by: Brian Russell Change-Id: Ia98a2f5655df6873259197d6bbf0ff2709b7d60e --- src/vnet/policer/police.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/vnet/policer/police.h') diff --git a/src/vnet/policer/police.h b/src/vnet/policer/police.h index 1005a620ccd..d135e43ef3e 100644 --- a/src/vnet/policer/police.h +++ b/src/vnet/policer/police.h @@ -22,6 +22,8 @@ typedef enum POLICE_VIOLATE = 2, } policer_result_e; +#define NUM_POLICE_RESULTS 3 + // This is the hardware representation of the policer. // To be multithread-safe, the policer is accessed through a spin-lock // on the lock field. (For a policer update operation, 24B needs to be -- cgit 1.2.3-korg