diff options
author | Fischetti, Antonio <antonio.fischetti@intel.com> | 2017-08-24 22:16:53 -0700 |
---|---|---|
committer | Darrell Ball <dlu998@gmail.com> | 2017-08-24 22:23:33 -0700 |
commit | 94053e66e3997dcf25dc1c1d0da0db6d57735388 (patch) | |
tree | 5c6f9bb45d99ae77002d6e6ce6a0844e37e6f27e /tests/test-conntrack.c | |
parent | 11d4c7a84326cfb6fac9eb2ca57a12d056b40b01 (diff) | |
download | openvswitch-94053e66e3997dcf25dc1c1d0da0db6d57735388.tar.gz |
conntrack: pass current time to conntrack_execute.
Current time is passed to conntrack_execute so it doesn't have
to recompute it again.
Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com>
Acked by: Sugesh Chandran <sugesh.chandran@intel.com>
Signed-off-by: Darrell Ball <dlu998@gmail.com>
Diffstat (limited to 'tests/test-conntrack.c')
-rw-r--r-- | tests/test-conntrack.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test-conntrack.c b/tests/test-conntrack.c index 6a77db8df..b27d18101 100644 --- a/tests/test-conntrack.c +++ b/tests/test-conntrack.c @@ -84,12 +84,13 @@ ct_thread_main(void *aux_) struct dp_packet_batch *pkt_batch; ovs_be16 dl_type; size_t i; + long long now = time_msec(); 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, - NULL, NULL); + NULL, NULL, now); } ovs_barrier_block(&barrier); destroy_packets(pkt_batch); @@ -154,6 +155,7 @@ pcap_batch_execute_conntrack(struct conntrack *ct, { struct dp_packet_batch new_batch; ovs_be16 dl_type = htons(0); + long long now = time_msec(); dp_packet_batch_init(&new_batch); @@ -172,7 +174,7 @@ pcap_batch_execute_conntrack(struct conntrack *ct, if (flow.dl_type != dl_type) { conntrack_execute(ct, &new_batch, dl_type, false, true, 0, - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, now); dp_packet_batch_init(&new_batch); } new_batch.packets[new_batch.count++] = packet;; @@ -180,7 +182,7 @@ pcap_batch_execute_conntrack(struct conntrack *ct, if (!dp_packet_batch_is_empty(&new_batch)) { conntrack_execute(ct, &new_batch, dl_type, false, true, 0, NULL, NULL, - NULL, NULL); + NULL, NULL, now); } } |