event/dsw: free rings on close

Message ID 20230511064029.6532-1-mattias.ronnblom@ericsson.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series event/dsw: free rings on close |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing fail Testing issues
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-unit-testing success Testing PASS

Commit Message

Mattias Rönnblom May 11, 2023, 6:40 a.m. UTC
  The per-port data and control rings were not freed when the event
device was closed.

Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
Cc: stable@dpdk.org

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_evdev.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Jerin Jacob May 16, 2023, 5:55 p.m. UTC | #1
On Thu, May 11, 2023 at 12:17 PM Mattias Rönnblom
<mattias.ronnblom@ericsson.com> wrote:
>
> The per-port data and control rings were not freed when the event
> device was closed.
>
> Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop")
> Cc: stable@dpdk.org
>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>


Updated the git commit as follows and applied to
dpdk-next-net-eventdev/for-main. Thanks


> ---
>  drivers/event/dsw/dsw_evdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
> index ffabf0d23d..6c5cde2468 100644
> --- a/drivers/event/dsw/dsw_evdev.c
> +++ b/drivers/event/dsw/dsw_evdev.c
> @@ -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;
> --
> 2.34.1
>
  

Patch

diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index ffabf0d23d..6c5cde2468 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -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;