aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index b583c3ef0dd..db9220d8c3b 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -257,32 +257,18 @@ typedef enum session_q_process_evt_
#define TRANSPORT_PROTO_INVALID (session_main.last_transport_proto_type + 1)
#define TRANSPORT_N_PROTOS (session_main.last_transport_proto_type + 1)
-static inline session_evt_elt_t *
-session_evt_elt_alloc (session_worker_t * wrk)
-{
- session_evt_elt_t *elt;
- pool_get (wrk->event_elts, elt);
- return elt;
-}
-
-static inline void
-session_evt_elt_free (session_worker_t * wrk, session_evt_elt_t * elt)
-{
- pool_put (wrk->event_elts, elt);
-}
-
static inline void
session_evt_add_old (session_worker_t * wrk, session_evt_elt_t * elt)
{
clib_llist_add_tail (wrk->event_elts, evt_list, elt,
- pool_elt_at_index (wrk->event_elts, wrk->old_head));
+ clib_llist_elt (wrk->event_elts, wrk->old_head));
}
static inline void
session_evt_add_head_old (session_worker_t * wrk, session_evt_elt_t * elt)
{
clib_llist_add (wrk->event_elts, evt_list, elt,
- pool_elt_at_index (wrk->event_elts, wrk->old_head));
+ clib_llist_elt (wrk->event_elts, wrk->old_head));
}
@@ -298,9 +284,9 @@ static inline session_evt_elt_t *
session_evt_alloc_ctrl (session_worker_t * wrk)
{
session_evt_elt_t *elt;
- elt = session_evt_elt_alloc (wrk);
+ clib_llist_get (wrk->event_elts, elt);
clib_llist_add_tail (wrk->event_elts, evt_list, elt,
- pool_elt_at_index (wrk->event_elts, wrk->ctrl_head));
+ clib_llist_elt (wrk->event_elts, wrk->ctrl_head));
return elt;
}
@@ -322,9 +308,9 @@ static inline session_evt_elt_t *
session_evt_alloc_new (session_worker_t * wrk)
{
session_evt_elt_t *elt;
- elt = session_evt_elt_alloc (wrk);
+ clib_llist_get (wrk->event_elts, elt);
clib_llist_add_tail (wrk->event_elts, evt_list, elt,
- pool_elt_at_index (wrk->event_elts, wrk->new_head));
+ clib_llist_elt (wrk->event_elts, wrk->new_head));
return elt;
}
@@ -332,9 +318,9 @@ static inline session_evt_elt_t *
session_evt_alloc_old (session_worker_t * wrk)
{
session_evt_elt_t *elt;
- elt = session_evt_elt_alloc (wrk);
+ clib_llist_get (wrk->event_elts, elt);
clib_llist_add_tail (wrk->event_elts, evt_list, elt,
- pool_elt_at_index (wrk->event_elts, wrk->old_head));
+ clib_llist_elt (wrk->event_elts, wrk->old_head));
return elt;
}