aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRajesh Goel <rajegoel@cisco.com>2020-09-03 18:38:03 +0530
committerOle Trøan <otroan@employees.org>2020-09-09 06:47:15 +0000
commit765008670bec75cab679c4f549c5dac744842887 (patch)
tree731b4859a739f20c7b4eaa71e4fe2a24b938e6a1 /src
parentddfd56265eb330fd472627f386be620b050a2601 (diff)
stats: Fix stat_segment to set timeout directly
Type: fix Signed-off-by: Rajesh Goel <rajegoel@cisco.com> Change-Id: Ib37802f4270fe894a31e871c7fbb12b5a1cdf058
Diffstat (limited to 'src')
-rw-r--r--src/vpp-api/client/stat_client.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vpp-api/client/stat_client.h b/src/vpp-api/client/stat_client.h
index 9d2e50c902e..c5fa5597758 100644
--- a/src/vpp-api/client/stat_client.h
+++ b/src/vpp-api/client/stat_client.h
@@ -145,6 +145,19 @@ stat_segment_set_timeout_nsec (stat_client_main_t * sm, uint64_t timeout)
sm->timeout = timeout;
}
+/*
+ * set maximum number of nano seconds to wait for in_progress state
+ * this function can be called directly by module using shared stat
+ * segment
+ */
+static inline void
+stat_segment_set_timeout (uint64_t timeout)
+{
+ stat_client_main_t *sm = &stat_client_main;
+ stat_segment_set_timeout_nsec (sm, timeout);
+}
+
+
static inline bool
stat_segment_access_end (stat_segment_access_t * sa, stat_client_main_t * sm)
{