+static int
+crypto_dequeue_burst(uint16_t num_pkts)
+{
+ struct ipsec_testsuite_params *ts_params = &testsuite_params;
+ struct ipsec_unitest_params *ut_params = &unittest_params;
+ uint32_t pkt_cnt, k;
+ int i;
+
+ for (i = 0, pkt_cnt = 0;
+ i < DEQUEUE_COUNT && pkt_cnt != num_pkts; i++) {
+ k = rte_cryptodev_dequeue_burst(ts_params->valid_dev, 0,
+ &ut_params->cop[pkt_cnt], num_pkts - pkt_cnt);
+ pkt_cnt += k;
+ rte_delay_us(1);
+ }
+
+ if (pkt_cnt != num_pkts) {
+ RTE_LOG(ERR, USER1, "rte_cryptodev_dequeue_burst fail\n");
+ return TEST_FAILED;
+ }
+ return TEST_SUCCESS;
+}
+