This patch returns a credit when an rte_event is
enqueued with an invalid queue_id. Previously a
credit was leaked from the system.
Note that the eventdev instance does not attempt
to free any resources that the rte_event owns. As
a result, resources owned by the rte_event are leaked.
Eg. if the rte_event represents an rte_mbuf, the mbuf
will not be freed, and causes a leak from the mempool.
Fixes:
656af9180014 ("event/sw: add worker core functions")
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
*/
if ((new_ops[i] & QE_FLAG_COMPLETE) && outstanding)
p->outstanding_releases--;
- /* Branch to avoid touching p->stats except error case */
- if (unlikely(invalid_qid))
+
+ /* error case: branch to avoid touching p->stats */
+ if (unlikely(invalid_qid)) {
p->stats.rx_dropped++;
+ p->inflight_credits++;
+ }
}
/* returns number of events actually enqueued */