diff options
author | Maxime Peim <mpeim@cisco.com> | 2023-01-06 11:57:38 +0000 |
---|---|---|
committer | Neale Ranns <neale@graphiant.com> | 2023-02-02 00:22:06 +0000 |
commit | 2d1a62bfddbba92a0aeec5c68e9b0a7903b178da (patch) | |
tree | b5a8306e9d345c18bb45a55b0cfa5786c02258f0 /src/vnet/policer/police.h | |
parent | 3220d9f16b3db05fe9ea8d756395cd8aa7755863 (diff) |
policer: API policer selection by index
Policer API calls were only by policer name. It is now possible to
select a policer by its index.
Some functionalities are also added to allow updating a policer
configuration and to refill its token buckets.
Some dead codes are being removed, and small fixes made.
Type: improvement
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I4cc8fda0fc7c635a4110da3e757356b150f9b606
Diffstat (limited to 'src/vnet/policer/police.h')
-rw-r--r-- | src/vnet/policer/police.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vnet/policer/police.h b/src/vnet/policer/police.h index 5ad249ef40e..8f126e22175 100644 --- a/src/vnet/policer/police.h +++ b/src/vnet/policer/police.h @@ -73,8 +73,6 @@ typedef enum typedef struct { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); - u32 lock; // for exclusive access to the struct - u32 single_rate; // 1 = single rate policer, 0 = two rate policer u32 color_aware; // for hierarchical policing u32 scale; // power-of-2 shift amount for lower rates @@ -93,11 +91,9 @@ typedef struct u32 current_bucket; // MOD u32 extended_limit; u32 extended_bucket; // MOD - - u64 last_update_time; // MOD u32 thread_index; // Tie policer to a thread, rather than lock - u32 pad32; - + u64 last_update_time; // MOD + u8 *name; } policer_t; STATIC_ASSERT_SIZEOF (policer_t, CLIB_CACHE_LINE_BYTES); |