diff options
author | Florin Coras <fcoras@cisco.com> | 2024-10-14 19:43:42 -0700 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2024-10-15 00:25:35 -0400 |
commit | 6771af7328fa570a68371253d0a6067e57ec771e (patch) | |
tree | 94d4b41aa58d8f757751b74513b065dc43f4b042 /src/plugins/hs_apps/proxy.h | |
parent | 15106becc5f572ca5948fa84042dee230a98e97b (diff) |
hsa: switch proxy to using first worker connects
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04821236ba8ab02525bd99a1ed4572dfcf5e5131
Diffstat (limited to 'src/plugins/hs_apps/proxy.h')
-rw-r--r-- | src/plugins/hs_apps/proxy.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/hs_apps/proxy.h b/src/plugins/hs_apps/proxy.h index 26f4de2f729..66361566fa6 100644 --- a/src/plugins/hs_apps/proxy.h +++ b/src/plugins/hs_apps/proxy.h @@ -41,8 +41,16 @@ typedef struct u32 po_thread_index; } proxy_session_t; +typedef struct proxy_worker_ +{ + clib_spinlock_t pending_connects_lock; + vnet_connect_args_t *pending_connects; + vnet_connect_args_t *burst_connects; +} proxy_worker_t; + typedef struct { + proxy_worker_t *workers; /**< per-thread data */ proxy_session_t *sessions; /**< session pool, shared */ clib_spinlock_t sessions_lock; /**< lock for session pool */ u8 **rx_buf; /**< intermediate rx buffers */ @@ -75,6 +83,13 @@ typedef struct extern proxy_main_t proxy_main; +static inline proxy_worker_t * +proxy_worker_get (u32 thread_index) +{ + proxy_main_t *pm = &proxy_main; + return vec_elt_at_index (pm->workers, thread_index); +} + #endif /* __included_proxy_h__ */ /* |