aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_schedule_iquery.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/odp_schedule_iquery.c')
-rw-r--r--platform/linux-generic/odp_schedule_iquery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c
index b69245788..75470aff8 100644
--- a/platform/linux-generic/odp_schedule_iquery.c
+++ b/platform/linux-generic/odp_schedule_iquery.c
@@ -21,6 +21,7 @@
#include <odp/api/hints.h>
#include <odp/api/cpu.h>
#include <odp/api/thrmask.h>
+#include <odp/api/packet_io.h>
#include <odp_config_internal.h>
/* Number of priority levels */
@@ -1176,7 +1177,9 @@ static int schedule_ord_enq_multi(uint32_t queue_index, void *buf_hdr[],
return 0;
}
- if (odp_unlikely(stash_num >= MAX_ORDERED_STASH)) {
+ /* Pktout may drop packets, so the operation cannot be stashed. */
+ if (dst_queue->s.pktout.pktio != ODP_PKTIO_INVALID ||
+ odp_unlikely(stash_num >= MAX_ORDERED_STASH)) {
/* If the local stash is full, wait until it is our turn and
* then release the stash and do enqueue directly. */
wait_for_order(src_queue);
@@ -1457,7 +1460,7 @@ static inline int consume_queue(int prio, unsigned int queue_index)
/* Low priorities have smaller batch size to limit
* head of line blocking latency.
*/
- if (odp_unlikely(prio > ODP_SCHED_PRIO_DEFAULT))
+ if (odp_unlikely(MAX_DEQ > 1 && prio > ODP_SCHED_PRIO_DEFAULT))
max = MAX_DEQ / 2;
/* For ordered queues we want consecutive events to