X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession_types.h;h=784312d9182ac4cf69ece3574f16c6c448597344;hb=22391fa92b95ee0376eb372450d6315523c8a9ae;hp=ca5dcc1c1238d31ef13e921aab494230775acd8b;hpb=00e01d3e875bb18397ff81e0f58f9b468477f473;p=vpp.git diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h index ca5dcc1c123..784312d9182 100644 --- a/src/vnet/session/session_types.h +++ b/src/vnet/session/session_types.h @@ -309,9 +309,21 @@ session_parse_handle (session_handle_t handle, u32 * index, } static inline session_handle_t -session_make_handle (u32 session_index, u32 thread_index) +session_make_handle (u32 session_index, u32 data) { - return (((u64) thread_index << 32) | (u64) session_index); + return (((u64) data << 32) | (u64) session_index); +} + +always_inline u32 +session_handle_index (session_handle_t ho_handle) +{ + return (ho_handle & 0xffffffff); +} + +always_inline u32 +session_handle_data (session_handle_t ho_handle) +{ + return (ho_handle >> 32); } typedef enum @@ -440,15 +452,21 @@ STATIC_ASSERT (sizeof (session_dgram_hdr_t) == (SESSION_CONN_ID_LEN + 8), _(REFUSED, "refused") \ _(TIMEDOUT, "timedout") \ _(ALLOC, "obj/memory allocation error") \ + _(OWNER, "object not owned by application") \ _(NOROUTE, "no route") \ _(NOINTF, "no resolving interface") \ _(NOIP, "no ip for lcl interface") \ _(NOPORT, "no lcl port") \ _(NOSUPPORT, "not supported") \ + _(NOLISTEN, "not listening") \ + _(NOSESSION, "session does not exist") \ + _(NOAPP, "app not attached") \ _(PORTINUSE, "lcl port in use") \ _(IPINUSE, "ip in use") \ _(ALREADY_LISTENING, "ip port pair already listened on") \ _(INVALID_RMT_IP, "invalid remote ip") \ + _(INVALID_APPWRK, "invalid app worker") \ + _(INVALID_NS, "invalid namespace") \ _(SEG_NO_SPACE, "Couldn't allocate a fifo pair") \ _(SEG_NO_SPACE2, "Created segment, couldn't allocate a fifo pair") \ _(SEG_CREATE, "Couldn't create a new segment") \