@@ -1498,6 +1498,9 @@ static void usage(char *progname)
" can be used to advanced pkt I/O selection for linux-generic\n"
" ODP_IPSEC_USE_POLL_QUEUES\n"
" to enable use of poll queues instead of scheduled (default)\n"
+ " ODP_IPSEC_STREAM_VERIFY_MDEQ\n"
+ " to enable use of multiple dequeue for queue draining during\n"
+ " stream verification instead of single dequeue (default)\n"
"\n", NO_PATH(progname), NO_PATH(progname)
);
}
@@ -517,7 +517,9 @@ odp_bool_t verify_stream_db_outputs(void)
{
odp_bool_t done = TRUE;
stream_db_entry_t *stream = NULL;
+ const char *env;
+ env = getenv("ODP_IPSEC_STREAM_VERIFY_MDEQ");
/* For each stream look for output packets */
for (stream = stream_db->list; NULL != stream; stream = stream->next) {
int idx;
@@ -531,14 +533,15 @@ odp_bool_t verify_stream_db_outputs(void)
continue;
for (;;) {
-#if LOOP_DEQ_MULTIPLE
- count = odp_queue_deq_multi(queue,
- ev_tbl,
- LOOP_DEQ_COUNT);
-#else
- ev_tbl[0] = odp_queue_deq(queue);
- count = (ev_tbl[0] != ODP_EVENT_INVALID) ? 1 : 0;
-#endif
+ if (env)
+ count = odp_queue_deq_multi(queue,
+ ev_tbl,
+ LOOP_DEQ_COUNT);
+ else {
+ ev_tbl[0] = odp_queue_deq(queue);
+ count = (ev_tbl[0] != ODP_EVENT_INVALID) ?
+ 1 : 0;
+ }
if (!count)
break;
for (idx = 0; idx < count; idx++) {