Skip to content

Commit

Permalink
event/dsw: free rings on close
Browse files Browse the repository at this point in the history
[ upstream commit 61e4cd6d0ad118c6f4d2724a840b651af9e9ec98 ]

The per-port data and control rings were not freed when the event
device was closed.

Fixes: 1c8e3ca ("event/dsw: add event scheduling and device start/stop")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
  • Loading branch information
m-ronnblom authored and kevintraynor committed Jul 11, 2023
1 parent 87c6203 commit 63daa71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/event/dsw/dsw_evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ static int
dsw_close(struct rte_eventdev *dev)
{
struct dsw_evdev *dsw = dsw_pmd_priv(dev);
uint16_t port_id;

for (port_id = 0; port_id < dsw->num_ports; port_id++)
dsw_port_release(&dsw->ports[port_id]);

dsw->num_ports = 0;
dsw->num_queues = 0;
Expand Down

0 comments on commit 63daa71

Please sign in to comment.