diff options
author | Florin Coras <fcoras@cisco.com> | 2019-08-13 08:35:39 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-08-13 17:34:16 +0000 |
commit | 3a7457201ca5752189d8ad0fc7025dcbda0f240a (patch) | |
tree | a6b7cbf57eb721542642116eee619ca29be18c3a /src/vnet/session | |
parent | 0325c021f48e20cf3af6dc37ebb9f9ce778563bd (diff) |
session: fix enqueue notification on 32bit systems
Type: fix
Ticket: VPP-1736
Change-Id: I7b5566525fc30fe0d3cc8cd991960f6ed2f1fc27
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5d8a806144fbf46c0575ef24ae081724dfbdbe75)
Diffstat (limited to 'src/vnet/session')
-rw-r--r-- | src/vnet/session/session.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 7b53a47023a..a102825c6f5 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -568,10 +568,10 @@ session_enqueue_notify (session_t * s) static void session_enqueue_notify_rpc (void *arg) { - session_handle_t sh = (session_handle_t) arg; + u32 session_index = pointer_to_uword (arg); session_t *s; - s = session_get_from_handle_if_valid (sh); + s = session_get_if_valid (session_index, vlib_get_thread_index ()); if (!s) return; @@ -586,8 +586,15 @@ void session_enqueue_notify_thread (session_handle_t sh) { u32 thread_index = session_thread_from_handle (sh); + u32 session_index = session_index_from_handle (sh); + + /* + * Pass session index (u32) as opposed to handle (u64) in case pointers + * are not 64-bit. + */ session_send_rpc_evt_to_thread (thread_index, - session_enqueue_notify_rpc, (void *) sh); + session_enqueue_notify_rpc, + uword_to_pointer (session_index, void *)); } int |