aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-30 12:01:48 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-31 08:17:33 +0000
commit5a7ca7bde104b12f8dc4a751fd911819d4bd6c8e (patch)
treec554ef8c3e544cb7c4a9134b4ac27da02c1f15a9 /src/plugins/unittest
parent1bce5a92087fc0caffe7723d2f2de7f1bf296046 (diff)
session: add wrk context
Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/plugins/unittest')
-rw-r--r--src/plugins/unittest/tcp_test.c10
1 files changed, 5 insertions, 5 deletions
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,