]> git.droids-corp.org - dpdk.git/blobdiff - drivers/event/sw/sw_evdev_worker.c
event/sw: fix credit return on invalid queue id
[dpdk.git] / drivers / event / sw / sw_evdev_worker.c
index b9b6f8d25d3a703490ef222e66b5fd1fc52fa4c7..9cb6bef58d8d77c57303d56323edd0bef6692b8a 100644 (file)
@@ -105,9 +105,12 @@ sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num)
                 */
                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 */