FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
session_lookup.c File Reference
+ Include dependency graph for session_lookup.c:

Go to the source code of this file.

Macros

#define foreach_hash_table_parameter
 

Typedefs

typedef clib_bihash_kv_16_8_t session_kv4_t
 
typedef clib_bihash_kv_48_8_t session_kv6_t
 

Functions

typedef CLIB_PACKED (struct{union{struct{ip4_address_t src;ip4_address_t dst;u16 src_port;u16 dst_port;u32 proto;};u64 as_u64[2];};})
 
static void make_v4_ss_kv (session_kv4_t *kv, ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
static void make_v4_listener_kv (session_kv4_t *kv, ip4_address_t *lcl, u16 lcl_port, u8 proto)
 
static void make_v4_ss_kv_from_tc (session_kv4_t *kv, transport_connection_t *t)
 
static void make_v6_ss_kv (session_kv6_t *kv, ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
static void make_v6_listener_kv (session_kv6_t *kv, ip6_address_t *lcl, u16 lcl_port, u8 proto)
 
static void make_v6_ss_kv_from_tc (session_kv6_t *kv, transport_connection_t *t)
 
void stream_session_table_add_for_tc (transport_connection_t *tc, u64 value)
 
void stream_session_table_add (session_manager_main_t *smm, stream_session_t *s, u64 value)
 
int stream_session_table_del_for_tc (transport_connection_t *tc)
 
int stream_session_table_del (stream_session_t *s)
 
void stream_session_half_open_table_add (transport_connection_t *tc, u64 value)
 
void stream_session_half_open_table_del (transport_connection_t *tc)
 
stream_session_tstream_session_lookup_listener4 (ip4_address_t *lcl, u16 lcl_port, u8 proto)
 
stream_session_tstream_session_lookup4 (ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 Looks up a session based on the 5-tuple passed as argument. More...
 
stream_session_tstream_session_lookup_listener6 (ip6_address_t *lcl, u16 lcl_port, u8 proto)
 
stream_session_tstream_session_lookup6 (ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
stream_session_tstream_session_lookup_listener (ip46_address_t *lcl, u16 lcl_port, u8 proto)
 
u64 stream_session_half_open_lookup_handle (ip46_address_t *lcl, ip46_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
transport_connection_tstream_session_half_open_lookup (ip46_address_t *lcl, ip46_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
static stream_session_tstream_session_get_tsi (u64 ti_and_si, u32 thread_index)
 
transport_connection_tstream_session_lookup_transport_wt4 (ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto, u32 my_thread_index)
 
transport_connection_tstream_session_lookup_transport4 (ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
transport_connection_tstream_session_lookup_transport_wt6 (ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto, u32 my_thread_index)
 
transport_connection_tstream_session_lookup_transport6 (ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
 
void session_lookup_init (void)
 

Variables

static session_lookup_t session_lookup
 Generate typed init functions for multiple hash table styles... More...
 
transport_proto_vft_ttp_vfts
 Per-type vector of transport protocol virtual function tables. More...
 
 v6_connection_key_t
 

Macro Definition Documentation

#define foreach_hash_table_parameter
Value:
_(v4,session,buckets,20000) \
_(v4,session,memory,(64<<20)) \
_(v6,session,buckets,20000) \
_(v6,session,memory,(64<<20)) \
_(v4,halfopen,buckets,20000) \
_(v4,halfopen,memory,(64<<20)) \
_(v6,halfopen,buckets,20000) \
_(v6,halfopen,memory,(64<<20))
vhost_user_memory_t memory
Definition: vhost-user.h:84

Definition at line 572 of file session_lookup.c.

Typedef Documentation

Definition at line 73 of file session_lookup.c.

Definition at line 74 of file session_lookup.c.

Function Documentation

typedef CLIB_PACKED ( struct{union{struct{ip4_address_t src;ip4_address_t dst;u16 src_port;u16 dst_port;u32 proto;};u64 as_u64[2];};}  )

Definition at line 36 of file session_lookup.c.

static void make_v4_listener_kv ( session_kv4_t kv,
ip4_address_t lcl,
u16  lcl_port,
u8  proto 
)
inlinestatic

Definition at line 92 of file session_lookup.c.

+ Here is the caller graph for this function:

static void make_v4_ss_kv ( session_kv4_t kv,
ip4_address_t lcl,
ip4_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)
inlinestatic

Definition at line 77 of file session_lookup.c.

+ Here is the caller graph for this function:

static void make_v4_ss_kv_from_tc ( session_kv4_t kv,
transport_connection_t t 
)
inlinestatic

Definition at line 107 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void make_v6_listener_kv ( session_kv6_t kv,
ip6_address_t lcl,
u16  lcl_port,
u8  proto 
)
inlinestatic

Definition at line 132 of file session_lookup.c.

+ Here is the caller graph for this function:

static void make_v6_ss_kv ( session_kv6_t kv,
ip6_address_t lcl,
ip6_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)
inlinestatic

Definition at line 114 of file session_lookup.c.

+ Here is the caller graph for this function:

static void make_v6_ss_kv_from_tc ( session_kv6_t kv,
transport_connection_t t 
)
inlinestatic

Definition at line 150 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void session_lookup_init ( void  )

Definition at line 583 of file session_lookup.c.

+ Here is the caller graph for this function:

static stream_session_t* stream_session_get_tsi ( u64  ti_and_si,
u32  thread_index 
)
inlinestatic

Definition at line 439 of file session_lookup.c.

+ Here is the caller graph for this function:

transport_connection_t* stream_session_half_open_lookup ( ip46_address_t *  lcl,
ip46_address_t *  rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Definition at line 426 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u64 stream_session_half_open_lookup_handle ( ip46_address_t *  lcl,
ip46_address_t *  rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Definition at line 390 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stream_session_half_open_table_add ( transport_connection_t tc,
u64  value 
)

Definition at line 226 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stream_session_half_open_table_del ( transport_connection_t tc)

Definition at line 249 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

stream_session_t* stream_session_lookup4 ( ip4_address_t lcl,
ip4_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Looks up a session based on the 5-tuple passed as argument.

First it tries to find an established session, if this fails, it tries finding a listener session if this fails, it tries a lookup with a wildcarded local source (listener bound to all interfaces)

Definition at line 297 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

stream_session_t* stream_session_lookup6 ( ip6_address_t lcl,
ip6_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Definition at line 348 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

stream_session_t* stream_session_lookup_listener ( ip46_address_t *  lcl,
u16  lcl_port,
u8  proto 
)

Definition at line 373 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

stream_session_t* stream_session_lookup_listener4 ( ip4_address_t lcl,
u16  lcl_port,
u8  proto 
)

Definition at line 270 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

stream_session_t* stream_session_lookup_listener6 ( ip6_address_t lcl,
u16  lcl_port,
u8  proto 
)

Definition at line 323 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_connection_t* stream_session_lookup_transport4 ( ip4_address_t lcl,
ip4_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Definition at line 479 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_connection_t* stream_session_lookup_transport6 ( ip6_address_t lcl,
ip6_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto 
)

Definition at line 542 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_connection_t* stream_session_lookup_transport_wt4 ( ip4_address_t lcl,
ip4_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto,
u32  my_thread_index 
)

Definition at line 447 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

transport_connection_t* stream_session_lookup_transport_wt6 ( ip6_address_t lcl,
ip6_address_t rmt,
u16  lcl_port,
u16  rmt_port,
u8  proto,
u32  my_thread_index 
)

Definition at line 510 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void stream_session_table_add ( session_manager_main_t smm,
stream_session_t s,
u64  value 
)

Definition at line 182 of file session_lookup.c.

+ Here is the call graph for this function:

void stream_session_table_add_for_tc ( transport_connection_t tc,
u64  value 
)

Definition at line 161 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int stream_session_table_del ( stream_session_t s)

Definition at line 216 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int stream_session_table_del_for_tc ( transport_connection_t tc)

Definition at line 193 of file session_lookup.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

session_lookup_t session_lookup
static

Generate typed init functions for multiple hash table styles...

Definition at line 31 of file session_lookup.c.

Per-type vector of transport protocol virtual function tables.

Definition at line 22 of file transport_interface.c.

v6_connection_key_t

Definition at line 70 of file session_lookup.c.