numam-dpdk/drivers
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
..
bbdev bb/turbo_sw: add software turbo driver 2018-01-19 01:44:25 +01:00
bus bus/fslmc: clear the vfio group on error 2018-01-17 00:44:47 +01:00
crypto bus/fslmc: support dynamic IOVA 2018-01-16 18:47:49 +01:00
event event/sw: fix queue memory leak and multi-link bug 2018-01-19 16:09:56 +01:00
mempool mempool/octeontx: fix natural alignment being optimized out 2018-01-19 00:43:56 +01:00
net log: remove log level config option 2018-01-17 14:21:46 +01:00
Makefile bb/null: add null base band device driver 2018-01-19 01:44:25 +01:00