stats: Fix stat_segment to set timeout directly 54/28654/3
authorRajesh Goel <rajegoel@cisco.com>
Thu, 3 Sep 2020 13:08:03 +0000 (18:38 +0530)
committerOle Trøan <otroan@employees.org>
Wed, 9 Sep 2020 06:47:15 +0000 (06:47 +0000)
Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: Ib37802f4270fe894a31e871c7fbb12b5a1cdf058

src/vpp-api/client/stat_client.h

index 9d2e50c..c5fa559 100644 (file)
@@ -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)
 {