diff options
author | Florin Coras <fcoras@cisco.com> | 2024-02-02 13:01:07 -0800 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2024-02-02 13:22:31 -0800 |
commit | f9bdc03c1c65d3ef96dfdaea09ed7c3a4507e257 (patch) | |
tree | 83b9621f7975ef5a043bece0746e3fb768a9d8dd /src/vnet/session/session_lookup.h | |
parent | e060b0a07930c615a00b697e136f5cf2400a7510 (diff) |
session: guard session lookup table allocs
Session lookup tables could be allocated from workers, e.g., connects
are done from first worker. Make sure consumers are not affected by
stopping workers.
Type: fix
Change-Id: I63b53c58b41ce91b08f50a2325c69c9f9fd25ed3
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_lookup.h')
-rw-r--r-- | src/vnet/session/session_lookup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/session/session_lookup.h b/src/vnet/session/session_lookup.h index 86148d1830a..f9ffc15165a 100644 --- a/src/vnet/session/session_lookup.h +++ b/src/vnet/session/session_lookup.h @@ -29,6 +29,11 @@ typedef enum session_lookup_result_ SESSION_LOOKUP_RESULT_FILTERED } session_lookup_result_t; +typedef struct session_lookup_main_ +{ + clib_spinlock_t st_alloc_lock; +} session_lookup_main_t; + session_t *session_lookup_safe4 (u32 fib_index, ip4_address_t * lcl, ip4_address_t * rmt, u16 lcl_port, u16 rmt_port, u8 proto); |