---------- Forwarded message ---------- From: khers <s3m2e1.6s...@gmail.com> Date: Sat, Jun 2, 2018 at 1:09 PM Subject: Re: [vpp-dev] anomaly in deleting tcp idle session in vpp To: Andrew Yourtchenko <ayour...@gmail.com>
Dear Andrew, I have observed a contradiction. In my test case, after being session table full, vpp start to delete idle sessions. trex command : ./t-rex-64 -c 3 --active-flows 10000 -f /cap2/concurrent_connection_test.yaml --nc -m 1000 --no-key yaml file and pcap file and patch file is attached to this email. I changed vpp 18.04 version to log session timeout type before removing them. Accordingly, I observed sessions with timeout type 1 ( 1 is used for idle session timeout) in my log. set acl-plugin session timeout udp idle 60 set acl-plugin session timeout tcp idle 3600 set acl-plugin session timeout tcp transient 30 On Wed, May 30, 2018 at 7:59 PM, Andrew Yourtchenko <ayour...@gmail.com> wrote: > If the table is full it should fifo-reuse the tcp transient sessions, not > the established ones. > > --a > > On 30 May 2018, at 14:00, emma sdi <s3m2e1.6s...@gmail.com> wrote: > > Dear Folks, > I have a problem with vpp stateful mode. I observed that vpp start to > delete tcp idle sessions when session table is full. my question is this > behavior is implemented and indeed it is normal routine? or is this an > anomaly? because this behavior is not normal generally (for example in > conntrack) and an established session have to exist till its timeout will > be zero. I expect vpp holds all old tcp idle sessions instead of creating > new sessions when session table doesn't have any empty entry. > Best Regards, > > >
concurrent_connection_test.yaml
Description: application/yaml
concurrent_connection_test_pcap.pcap
Description: application/vnd.tcpdump.pcap
diff --git a/src/plugins/acl/fa_node.c b/src/plugins/acl/fa_node.c index a36a5815..bb965bb2 100644 --- a/src/plugins/acl/fa_node.c +++ b/src/plugins/acl/fa_node.c @@ -388,6 +388,9 @@ acl_fa_conn_list_delete_session (acl_main_t *am, fa_full_session_id_t sess_id) return 0; } fa_session_t *sess = get_session_ptr(am, sess_id.thread_index, sess_id.session_index); + u32 res = -1; + if(sess) + res = fa_session_get_timeout_type (am, sess); /* we should never try to delete the session with another thread index */ ASSERT(sess->thread_index == thread_index); if (~0 != sess->link_prev_idx) { @@ -408,6 +411,8 @@ acl_fa_conn_list_delete_session (acl_main_t *am, fa_full_session_id_t sess_id) if (pw->fa_conn_list_tail[sess->link_list_id] == sess_id.session_index) { pw->fa_conn_list_tail[sess->link_list_id] = sess->link_prev_idx; } + + printf("acl_fa_conn_list_delete_session: the session timeout type is %d \n ", res); return 1; } @@ -449,6 +454,9 @@ acl_fa_delete_session (acl_main_t * am, u32 sw_if_index, fa_full_session_id_t se void *oldheap = clib_mem_set_heap(am->acl_mheap); fa_session_t *sess = get_session_ptr(am, sess_id.thread_index, sess_id.session_index); ASSERT(sess->thread_index == os_get_thread_index ()); + u32 res = -1; + if(sess) + res = fa_session_get_timeout_type (am, sess); BV (clib_bihash_add_del) (&am->fa_sessions_hash, &sess->info.kv, 0); acl_fa_per_worker_data_t *pw = &am->per_worker_data[sess_id.thread_index]; @@ -459,6 +467,8 @@ acl_fa_delete_session (acl_main_t * am, u32 sw_if_index, fa_full_session_id_t se clib_mem_set_heap (oldheap); pw->fa_session_dels_by_sw_if_index[sw_if_index]++; clib_smp_atomic_add(&am->fa_session_total_dels, 1); + printf("acl_delete_session_function:the session timeout type is %d \n", res); + } static int