From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22F9642AD3; Thu, 11 May 2023 08:47:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC16340C35; Thu, 11 May 2023 08:47:16 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2083.outbound.protection.outlook.com [40.107.7.83]) by mails.dpdk.org (Postfix) with ESMTP id 37080406B3; Thu, 11 May 2023 08:47:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VTuia2F4rFnkUIDCfNPfIIgs8UcaAi5Blp9h/eEd1vzM3Li8gRwe//TC0zXYHaX3bhIMZ1fZ9V2SLwI970KcLm+ONfSw54+TUYGpaR6H7UqtqyC4Bnkl6m5vOS346D/COlYfcS8omE5TVMCj1Iqkyl1Qu1vxy8Gbmk2X9XVKiUMtnBFfKA3ps5UMKUxHNq+gE2yZGHH5EP9qB3m5sgR/W1w/DxhnByHL9Cr5K74C3y9ITAHbwU0/QbP/wqJJj1o4wQaHlv5gaFRRC0xcBpcFlzHpW456EynmSQG5h9hxtlkzEi3Gaji0iZ7+r3SxcGIMJqdB9FISeGPltI4Qbqqt6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OLKVH71MxC3n60/4SixlsHtbKTyHsKPYzJFfbSssVPU=; b=LBXpP0Cdx0ifH25V0Il+c0v2stNRiqARAVlRU53Qd16YrL7zGPZk5WXvL8uWPO5HsqXaWuzv9rl41PjTebjopWG3QKcfkvGBiB+RTcHhIjyCW12i4i8Z0UcogciY3B6AFnnd9dLU7xOTOZXqMUhP9yPqywAvO+OS5IWtudK7yingeRZZjbin9vQTZ2MEvMKED/+IQNO/h3xE9BGb9lheMvpGpoKbAPJkda4/P1/pqmIKqFhKxHRxoy/TeW+7m5OM7kn873rE3teexkyx/Jr9YQPqJkDxGNsbVY7bue4ghVUJRga0yxjZQ4MpaVWy1tGFhJv/7H+p42bb7dCFWAUofA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OLKVH71MxC3n60/4SixlsHtbKTyHsKPYzJFfbSssVPU=; b=MgqoXsADkYFRf1nJdrYnnmsGJhIZpNm1CWUmF2vGnf/RQyAGjMBcGbC3PLOEt84p4uvLBreF869rUcTr1bbdd9rm7zJa0MdX0SscSAOJRKxk8duCej7VzrFWRzOg6GEnsFtkBR/lijj7mDxRY/ZVHnjTNcR9J9iQED9+TmWT+PY= Received: from DUZPR01CA0050.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::20) by DU0PR07MB8882.eurprd07.prod.outlook.com (2603:10a6:10:313::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.19; Thu, 11 May 2023 06:47:13 +0000 Received: from DB5EUR02FT053.eop-EUR02.prod.protection.outlook.com (2603:10a6:10:469:cafe::d7) by DUZPR01CA0050.outlook.office365.com (2603:10a6:10:469::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.20 via Frontend Transport; Thu, 11 May 2023 06:47:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DB5EUR02FT053.mail.protection.outlook.com (10.13.58.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.6387.21 via Frontend Transport; Thu, 11 May 2023 06:47:13 +0000 Received: from ESESBMB502.ericsson.se (153.88.183.169) by ESESBMB503.ericsson.se (153.88.183.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 11 May 2023 08:47:08 +0200 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.185) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Thu, 11 May 2023 08:47:07 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 2B645380061; Thu, 11 May 2023 08:47:08 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: Jerin Jacob , , , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Subject: [PATCH] event/dsw: free rings on close Date: Thu, 11 May 2023 08:40:29 +0200 Message-ID: <20230511064029.6532-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5EUR02FT053:EE_|DU0PR07MB8882:EE_ X-MS-Office365-Filtering-Correlation-Id: 57d81bc6-941d-404e-ee44-08db51eb8d62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6pGMGt6qLynS4EhyKHQWaWKN9oPQgCRvmeGDaRW4ASILjMnmsO+mjzW3qJb8ZW/vu+IbL3wANA72Y6Z2V86GYtO74XIxo4f040vZntTKyTeAP8MSSQK7iGUd7x6ha8fSo48yq8NhSjZ/1NxUkagc+tipYMCoyAz2nD/lFksmJIxWBgIW3iZzD4Iibv2xYY94UVMvpSPIuo0Do7x6uharHtJ/LEBr9qOdRXVl6SIlAPxHxFEIWvFOFrqKDtEP8DAez2leAWihADO9g1fpPhI7c30kd/vTDRW8UykRO+4M0mZX+olMUSvBFOCc8vDyBMvvCX9jds07bAFCwtIaoJHP1sGaYOPV5WkipcdElvQDGoIc4gC1NIFoyUTKKjt+9SnK+qQGNPIIluCh3mHWggqPls/2YY3p89o2LwKgs60HCvYbDDdlR1YXR++8aeGuSGwE6MheFdbVANMLs7F28DtkGWjUCAzS2ml9gDTfy9mRwyjijnWXjvAZ0NVxi1X1tXU3hNKWGUyIJYSKp0wPf49qXoNUvBfFoz96bLxJ9Jb+HHzs7X50p+rATfBG86KJLfubRLmPLswenbs8Wc5O3u8BWzLd2eG21c0uEy/HynBToudgB9v45vFo53JRzx7XRhqobyeHqp13x19nBsqyaXtBjOv3fCyAvXJtNmms+7WdM/YEEHckE5FmPf/lpRTE5YSIOIFfdJsRaHAd3KfYl88OtnwD06K6xDlI2AYsAaWZfgv4PEa0fXEsiNFZTK5PEi8g X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199021)(46966006)(36840700001)(40470700004)(82310400005)(41300700001)(5660300002)(40460700003)(8936002)(8676002)(478600001)(40480700001)(316002)(54906003)(82960400001)(7636003)(82740400003)(356005)(6666004)(26005)(6916009)(36756003)(4326008)(70586007)(70206006)(2616005)(86362001)(186003)(6266002)(2906002)(83380400001)(66574015)(47076005)(36860700001)(4744005)(336012)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2023 06:47:13.3355 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57d81bc6-941d-404e-ee44-08db51eb8d62 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR02FT053.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR07MB8882 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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