eventdev: improve error handling for Rx adapter queue add/del
authorNikhil Rao <nikhil.rao@intel.com>
Mon, 2 Jul 2018 09:11:11 +0000 (14:41 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Fri, 6 Jul 2018 04:54:49 +0000 (06:54 +0200)
commitbfc828d295533de914828fcd3bcbd09e23a9005b
tree0320db1b6dc7613383ddf86e0e650547da9dce27
parent8b01dfb423eaccebe95938a438d94733d41bbd98
eventdev: improve error handling for Rx adapter queue add/del

The new WRR sequence applicable after queue add/del is set
up after setting the new queue state, so a memory allocation
failure will leave behind an incorrect state.

This change separates the memory sizing + allocation for the
Rx poll and WRR array from calculation of the WRR sequence.
If there is a memory allocation failure, existing Rx queue
configuration remains unchanged.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
lib/librte_eventdev/rte_event_eth_rx_adapter.c