diff --git a/test/unittests/batchMaker_test.cpp b/test/unittests/batchMaker_test.cpp index 4ec6d2d433c44853ae5cc3042be9357c9396a45f..d179037804ca2fb48b490082d2fb7e675ae77e08 100644 --- a/test/unittests/batchMaker_test.cpp +++ b/test/unittests/batchMaker_test.cpp @@ -252,7 +252,7 @@ TEST_CASE("input parameter struct type") { TEST_CASE("make fast_flows_packet fn as batched form") { std::string filePrefix = "fast_flows"; - auto M = parseIR(filePrefix + string(".ll"), input_dir); + auto M = parseIR(generateIR(filePrefix + string(".c"), input_dir, true), input_dir); REQUIRE(M != nullptr); M->setSourceFileName(filePrefix + string("_batch.ll")); { diff --git a/test/unittests/inputs/batchmaker_test6_main.c b/test/unittests/inputs/batchmaker_test6_main.c index 9303ca70d83043e85f585abab3ee373116604e31..eabac0542b91b1ad5a0077975560261606c011df 100644 --- a/test/unittests/inputs/batchmaker_test6_main.c +++ b/test/unittests/inputs/batchmaker_test6_main.c @@ -70,7 +70,7 @@ int main() { for (int i = 0; i < batch_size; ++i) { if (aptr[i]->field1 != 1 && aptr[i]->field2 != 2) { - rc--; return rc; + rc--; break; } } for (int i = 0; i < batch_size; ++i) { diff --git a/test/unittests/inputs/fast_flows.c b/test/unittests/inputs/fast_flows.c index 10063b85f9db054d6f75201c0df7b67298cfb986..8c7ecbef8cfbd98ef5b07fb413a1cd0f1a929278 100644 --- a/test/unittests/inputs/fast_flows.c +++ b/test/unittests/inputs/fast_flows.c @@ -281,7 +281,7 @@ void fast_flows_packet_pfbufs(struct dataplane_context *ctx, /* Received packet */ int fast_flows_packet(struct dataplane_context *ctx, - struct network_buf_handle *nbh BATCH_ARG, void *fsp BATCH_ARG, struct tcp_opts *opts BATCH_ARG, + struct network_buf_handle *nbh BATCH_ARG, void *fsp BATCH_ARG, struct tcp_opts opts BATCH_ARG, uint32_t ts) TAS_BLOCK_PREDICATION { struct pkt_tcp *p; @@ -493,11 +493,11 @@ int fast_flows_packet(struct dataplane_context *ctx, #endif /* update rtt estimate */ - fs->tx_next_ts = f_beui32(opts->ts->ts_val); + fs->tx_next_ts = f_beui32(opts.ts->ts_val); if (LIKELY((TCPH_FLAGS(&p->tcp) & TCP_ACK) == TCP_ACK && - f_beui32(opts->ts->ts_ecr) != 0)) + f_beui32(opts.ts->ts_ecr) != 0)) { - rtt = ts - f_beui32(opts->ts->ts_ecr); + rtt = ts - f_beui32(opts.ts->ts_ecr); if (rtt < TCP_MAX_RTT) { if (LIKELY(fs->rtt_est != 0)) { fs->rtt_est = (fs->rtt_est * 7 + rtt) / 8; @@ -635,7 +635,7 @@ unlock: /* if we need to send an ack, also send packet to TX pipeline to do so */ if (trigger_ack) { flow_tx_ack(ctx, fs->tx_next_seq, fs->rx_next_seq, fs->rx_avail, - fs->tx_next_ts, ts, nbh, opts->ts); + fs->tx_next_ts, ts, nbh, opts.ts); } fs_unlock(fs);