event/sw: allow forward and release when out of credits
authorGage Eads <gage.eads@intel.com>
Fri, 8 Sep 2017 18:07:52 +0000 (13:07 -0500)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Wed, 25 Oct 2017 12:03:43 +0000 (14:03 +0200)
commit6cf86202630e754b2182bdc812dc153e04a78b5c
tree066fa7fea53645f5371dd98b31825d35e15fa336
parent824e81f433fd10cbc05d93efb0aa5b711a76741b
event/sw: allow forward and release when out of credits

When forwarding or releasing events, the operation would fail if the port
has 0 inflight credits and cannot acquire more, or the inflight count
exceeds the port's new event threshold.

This patch fixes that by counting the number of new events in the burst,
and applying the credit and new event threshold checks accordingly.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
drivers/event/sw/sw_evdev_worker.c