Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
IPSEC: move SA counters into the stats segment
[vpp.git]
/
src
/
vnet
/
ipsec
/
ikev2.c
diff --git
a/src/vnet/ipsec/ikev2.c
b/src/vnet/ipsec/ikev2.c
index
3d5c0f7
..
d85feee
100644
(file)
--- a/
src/vnet/ipsec/ikev2.c
+++ b/
src/vnet/ipsec/ikev2.c
@@
-3376,6
+3376,7
@@
ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa)
ikev2_sa_t *fsa = 0;
ikev2_child_sa_t *fchild = 0;
f64 now = vlib_time_now (vm);
ikev2_sa_t *fsa = 0;
ikev2_child_sa_t *fchild = 0;
f64 now = vlib_time_now (vm);
+ vlib_counter_t counts;
/* Search for the SA and child SA */
vec_foreach (tkm, km->per_thread_data)
/* Search for the SA and child SA */
vec_foreach (tkm, km->per_thread_data)
@@
-3394,11
+3395,13
@@
ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa)
}));
/* *INDENT-ON* */
}
}));
/* *INDENT-ON* */
}
+ vlib_get_combined_counter (&ipsec_sa_counters,
+ ipsec_sa->stat_index, &counts);
if (fchild && fsa && fsa->profile && fsa->profile->lifetime_maxdata)
{
if (!fchild->is_expired
if (fchild && fsa && fsa->profile && fsa->profile->lifetime_maxdata)
{
if (!fchild->is_expired
- &&
ipsec_sa->total_data_size
> fsa->profile->lifetime_maxdata)
+ &&
counts.bytes
> fsa->profile->lifetime_maxdata)
{
fchild->time_to_expiration = now;
}
{
fchild->time_to_expiration = now;
}