X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fsi%2Finclude%2Frmr_si_private.h;h=8109acdaf19e03aeff8fbfc2276aa9acce0d13d5;hb=refs%2Ftags%2F4.7.3;hp=f125efb701cd16884b9991630b8a48909f4a57b1;hpb=5ec64c5253b3b7611ec69cc1487989fae45eca26;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/si/include/rmr_si_private.h b/src/rmr/si/include/rmr_si_private.h index f125efb..8109acd 100644 --- a/src/rmr/si/include/rmr_si_private.h +++ b/src/rmr/si/include/rmr_si_private.h @@ -56,6 +56,7 @@ #define SI_MAX_ADDR_LEN 512 +#define MAX_RIVERS 1024 // max number of directly mapped rivers /* Manages a river of inbound bytes. @@ -74,7 +75,7 @@ typedef struct { Callback context. typedef struct { uta_ctx_t* ctx; - + } cbctx_t; */ @@ -121,7 +122,7 @@ struct uta_ctx { int shutdown; // thread notification if we need to tell them to stop int max_mlen; // max message length payload+header int max_plen; // max payload length - int flags; // CTXFL_ constants + int flags; // CFL_ constants int nrtele; // number of elements in the routing table int send_retries; // number of retries send_msg() should attempt if eagain/timeout indicated by nng int trace_data_len; // number of bytes to allocate in header for trace data @@ -129,6 +130,9 @@ struct uta_ctx { int d2_len; // extra header data 2 length (future) int nn_sock; // our general listen socket int rtable_ready; // set to true when rt is received or loaded + int snarf_rt_fd; // the file des where we save the last rt from RM + int dcount; // drop counter when app is slow + char* seed_rt_fname; // the static/seed route table; name captured at start route_table_t* rtable; // the active route table route_table_t* old_rtable; // the previously used rt, sits here to allow for draining route_table_t* new_rtable; // route table under construction @@ -153,6 +157,7 @@ struct uta_ctx { si_ctx_t* si_ctx; // the socket context int nrivers; // allocated rivers river_t* rivers; // inbound flows (index is the socket fd) + void* river_hash; // flows with fd values > nrivers must be mapped through the hash int max_ibm; // max size of an inbound message (river accum alloc size) void* zcb_mring; // zero copy buffer mbuf ring void* fd2ep; // the symtab mapping file des to endpoints for cleanup on disconnect @@ -205,4 +210,7 @@ static endpoint_t* fd2ep_get( uta_ctx_t* ctx, int fd ); static void fd2ep_init( uta_ctx_t* ctx ); static void fd2ep_add( uta_ctx_t* ctx, int fd, endpoint_t* ep ); +// ------ misc --------------------------------------------------- +static inline void incr_ep_counts( int state, endpoint_t* ep ); // must declare for static includes, but after headers + #endif