vec_validate (xd->hqos_ht->pkts_deq, hqos->burst_deq - 1);
xd->hqos_ht->pkts_enq_len = 0;
xd->hqos_ht->swq_pos = 0;
+ xd->hqos_ht->flush_count = 0;
/* Set up per-thread device data for each worker thread */
for (i = 0; i < worker_thread_count; i++)
u32 pkts_enq_len = hqos->pkts_enq_len;
u32 swq_pos = hqos->swq_pos;
u32 n_swq = vec_len (hqos->swq), i;
+ u32 flush_count = hqos->flush_count;
for (i = 0; i < n_swq; i++)
{
rte_pktmbuf_free (pkts_enq[n_pkts]);
pkts_enq_len = 0;
+ flush_count = 0;
break;
}
}
+ if (pkts_enq_len)
+ {
+ flush_count++;
+ if (PREDICT_FALSE (flush_count == HQOS_FLUSH_COUNT_THRESHOLD))
+ {
+ rte_sched_port_enqueue (hqos->hqos, pkts_enq, pkts_enq_len);
+
+ pkts_enq_len = 0;
+ flush_count = 0;
+ }
+ }
hqos->pkts_enq_len = pkts_enq_len;
+ hqos->flush_count = flush_count;
/* Advance to next device */
dev_pos++;
u32 pkts_enq_len = hqos->pkts_enq_len;
u32 swq_pos = hqos->swq_pos;
u32 n_swq = vec_len (hqos->swq), i;
+ u32 flush_count = hqos->flush_count;
/*
* SWQ dequeue and HQoS enqueue for current device
rte_sched_port_enqueue (hqos->hqos, pkts_enq, pkts_enq_len);
pkts_enq_len = 0;
+ flush_count = 0;
break;
}
}
+ if (pkts_enq_len)
+ {
+ flush_count++;
+ if (PREDICT_FALSE (flush_count == HQOS_FLUSH_COUNT_THRESHOLD))
+ {
+ rte_sched_port_enqueue (hqos->hqos, pkts_enq, pkts_enq_len);
+
+ pkts_enq_len = 0;
+ flush_count = 0;
+ }
+ }
hqos->pkts_enq_len = pkts_enq_len;
+ hqos->flush_count = flush_count;
/*
* HQoS dequeue and HWQ TX enqueue for current device