From 5a7ca7bde104b12f8dc4a751fd911819d4bd6c8e Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 30 Oct 2018 12:01:48 -0700 Subject: session: add wrk context Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897 Signed-off-by: Florin Coras --- src/plugins/unittest/tcp_test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/unittest') diff --git a/src/plugins/unittest/tcp_test.c b/src/plugins/unittest/tcp_test.c index 3bde8054901..0bc1153e6dd 100644 --- a/src/plugins/unittest/tcp_test.c +++ b/src/plugins/unittest/tcp_test.c @@ -1646,9 +1646,9 @@ tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input) /* * Allocate fake session and connection 1 */ - pool_get (smm->sessions[0], s); + pool_get (smm->wrk[0].sessions, s); clib_memset (s, 0, sizeof (*s)); - s->session_index = sidx = s - smm->sessions[0]; + s->session_index = sidx = s - smm->wrk[0].sessions; pool_get (tm->connections[0], tc); clib_memset (tc, 0, sizeof (*tc)); @@ -1667,9 +1667,9 @@ tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input) /* * Allocate fake session and connection 2 */ - pool_get (session_manager_main.sessions[0], s); + pool_get (smm->wrk[0].sessions, s); clib_memset (s, 0, sizeof (*s)); - s->session_index = s - smm->sessions[0]; + s->session_index = s - smm->wrk[0].sessions; pool_get (tm->connections[0], tc); clib_memset (tc, 0, sizeof (*tc)); @@ -1689,7 +1689,7 @@ tcp_test_lookup (vlib_main_t * vm, unformat_input_t * input) * Confirm that connection lookup works */ - s1 = pool_elt_at_index (smm->sessions[0], sidx); + s1 = pool_elt_at_index (smm->wrk[0].sessions, sidx); session_lookup_add_connection (tc1, session_handle (s1)); tconn = session_lookup_connection_wt4 (0, &tc1->lcl_ip.ip4, &tc1->rmt_ip.ip4, -- cgit 1.2.3-korg