numam-dpdk/drivers/event
Gage Eads e1f2dcdb8f event/sw: fix queue memory leak and multi-link bug
This commit reinitializes a queue before it is reconfigured, such that
reorder buffer memory is not leaked.

This bug masked a few other problems, which this commit corrects as well:
- sw_port_link() allowed a port to link to a queue twice, such that the
  port could then successfully unlink the queue twice. Now the link
  function checks whether a port is already linked to the queue, and if so
  returns success but doesn't assign the a port a second slot in the
  queue's cq map.
- test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice
  from the same port, and expecting the second unlink to succeed. Now the
  test unlinks, links, then unlinks again.
- test_eventdev.c's test_eventdev_link_get() was linking a single queue but
  expecting the unlink function to return nb_queues (where nb_queues > 1).
  The test now checks for a return value of 1.

Fixes: 5ffb2f142d ("event/sw: support event queues")
Fixes: 371a688fc1 ("event/sw: support linking queues to ports")
Fixes: f8f9d233ea ("test/eventdev: add unit tests")
Cc: stable@dpdk.org

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2018-01-19 16:09:56 +01:00
..
dpaa2 drivers: use SPDX tag in NXP dpaa2 files 2018-01-04 22:41:39 +01:00
octeontx event/octeontx: fix Rx adapter port id mapping 2018-01-16 18:47:49 +01:00
skeleton drivers: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00
sw event/sw: fix queue memory leak and multi-link bug 2018-01-19 16:09:56 +01:00
Makefile drivers: use SPDX tag for Cavium copyright files 2018-01-09 16:19:01 +01:00