summaryrefslogtreecommitdiff
path: root/tests/test-conntrack.c
diff options
context:
space:
mode:
authorDarrell Ball <dlu998@gmail.com>2019-05-02 21:34:04 -0700
committerBen Pfaff <blp@ovn.org>2019-05-03 09:46:22 -0700
commit57593fd2437836a59e66e124228e433f246ee744 (patch)
tree1c10f7d361ef418d9ca533f3fb66132a793c28d2 /tests/test-conntrack.c
parentabf11558c1515bf3b1ecfe4790fe9ec212d7d245 (diff)
downloadopenvswitch-57593fd2437836a59e66e124228e433f246ee744.tar.gz
conntrack: Stop exporting internal datastructures.
Stop the exporting of the main internal conntrack datastructure. Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/test-conntrack.c')
-rw-r--r--tests/test-conntrack.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c
index 07a4857cf..f77ee75e3 100644
--- a/tests/test-conntrack.c
+++ b/tests/test-conntrack.c
@@ -72,7 +72,7 @@ struct thread_aux {
unsigned tid;
};
-static struct conntrack ct;
+static struct conntrack *ct;
static unsigned long n_threads, n_pkts, batch_size;
static bool change_conn = false;
static struct ovs_barrier barrier;
@@ -89,7 +89,7 @@ ct_thread_main(void *aux_)
pkt_batch = prepare_packets(batch_size, change_conn, aux->tid, &dl_type);
ovs_barrier_block(&barrier);
for (i = 0; i < n_pkts; i += batch_size) {
- conntrack_execute(&ct, pkt_batch, dl_type, false, true, 0, NULL, NULL,
+ conntrack_execute(ct, pkt_batch, dl_type, false, true, 0, NULL, NULL,
0, 0, NULL, NULL, now);
}
ovs_barrier_block(&barrier);
@@ -124,7 +124,7 @@ test_benchmark(struct ovs_cmdl_context *ctx)
threads = xcalloc(n_threads, sizeof *threads);
ovs_barrier_init(&barrier, n_threads + 1);
- conntrack_init(&ct);
+ ct = conntrack_init();
/* Create threads */
for (i = 0; i < n_threads; i++) {
@@ -144,7 +144,7 @@ test_benchmark(struct ovs_cmdl_context *ctx)
xpthread_join(threads[i].thread, NULL);
}
- conntrack_destroy(&ct);
+ conntrack_destroy(ct);
ovs_barrier_destroy(&barrier);
free(threads);
}
@@ -211,7 +211,7 @@ test_pcap(struct ovs_cmdl_context *ctx)
fatal_signal_init();
- conntrack_init(&ct);
+ ct = conntrack_init();
total_count = 0;
for (;;) {
struct dp_packet *packet;
@@ -229,7 +229,7 @@ test_pcap(struct ovs_cmdl_context *ctx)
if (dp_packet_batch_is_empty(batch)) {
break;
}
- pcap_batch_execute_conntrack(&ct, batch);
+ pcap_batch_execute_conntrack(ct, batch);
DP_PACKET_BATCH_FOR_EACH (i, packet, batch) {
struct ds ds = DS_EMPTY_INITIALIZER;
@@ -244,7 +244,7 @@ test_pcap(struct ovs_cmdl_context *ctx)
dp_packet_delete_batch(batch, true);
}
- conntrack_destroy(&ct);
+ conntrack_destroy(ct);
ovs_pcap_close(pcap);
}