aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-04-06 15:54:14 -0700
committerDamjan Marion <dmarion@me.com>2021-04-07 11:58:03 +0000
commit1c19aefe907d2a7251ed538241256b4359e96167 (patch)
treed60b2984207769c6d553481c632adec9d32529ee /src/vnet
parent48524a9072c1c7cda964f8777d3a08a1aa63c533 (diff)
session: fix coverity warning
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id2c06f49bcae1a26a2d16d58f9da7a4d3175bf3c
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/session.h2
-rw-r--r--src/vnet/session/session_node.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 93278d6c3e1..a05ecb4905d 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -104,7 +104,7 @@ typedef struct session_worker_
u32 **session_to_enqueue;
/** Timerfd used to periodically signal wrk session queue node */
- u32 timerfd;
+ int timerfd;
/** Worker flags */
session_wrk_flag_t flags;
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index d7adbb5fd06..d40411cb547 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1445,7 +1445,7 @@ session_wrk_tfd_timeout (session_wrk_state_t state, u32 thread_index)
}
static inline void
-session_wrk_state_update (session_worker_t *wrk, session_wrk_state_t state)
+session_wrk_set_state (session_worker_t *wrk, session_wrk_state_t state)
{
u64 time_ns;
@@ -1464,7 +1464,7 @@ session_wrk_update_state (session_worker_t *wrk)
if (pool_elts (wrk->event_elts) == 3 &&
vlib_last_vectors_per_main_loop (vm) < 1)
{
- session_wrk_state_update (wrk, SESSION_WRK_INTERRUPT);
+ session_wrk_set_state (wrk, SESSION_WRK_INTERRUPT);
vlib_node_set_state (vm, session_queue_node.index,
VLIB_NODE_STATE_INTERRUPT);
}
@@ -1474,20 +1474,20 @@ session_wrk_update_state (session_worker_t *wrk)
if (pool_elts (wrk->event_elts) > 3 ||
vlib_last_vectors_per_main_loop (vm) > 1)
{
- session_wrk_state_update (wrk, SESSION_WRK_POLLING);
+ session_wrk_set_state (wrk, SESSION_WRK_POLLING);
vlib_node_set_state (vm, session_queue_node.index,
VLIB_NODE_STATE_POLLING);
}
else if (PREDICT_FALSE (!pool_elts (wrk->sessions)))
{
- session_wrk_state_update (wrk, SESSION_WRK_IDLE);
+ session_wrk_set_state (wrk, SESSION_WRK_IDLE);
}
}
else
{
if (pool_elts (wrk->event_elts))
{
- session_wrk_state_update (wrk, SESSION_WRK_INTERRUPT);
+ session_wrk_set_state (wrk, SESSION_WRK_INTERRUPT);
}
}
}