From patchwork Thu Sep 22 07:53:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Naga Harish K, S V" X-Patchwork-Id: 116640 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD53BA0543; Thu, 22 Sep 2022 09:53:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6715E40156; Thu, 22 Sep 2022 09:53:34 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C98A4400D7; Thu, 22 Sep 2022 09:53:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663833213; x=1695369213; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TYtLNJ31tJxa3rrkXu3RsXV5BU0NcGBERrgEcYBZu/A=; b=EDZFpJJbMKlbXPFWUSnCrFFtP33sO2+NqWa/w32sFAzqeVwP+Y+oOgKx Zjxmi9gMkTB3GV+rC5w9ox5pzCStRRMIIwx+Xa0frr9+eZXt5NfxH4Idu zdoJ6bTbDIHzWrrhTfDv0VFoxG5PpU2TZhpXWhBzT/B+FmAtkVqPqMhXb 8VURCw4mdn7piQfjYcGGHO1M3enNk/W7Hu+YIdgtKRnoPY46fdk0jwLpX AF2zWFFh0jvQFpfwYdxuOu702k+L5/kmrxwj7qu1zc3lvH+i/rUkgEn+N H+eIF6PBaxymwAikMxrqsO536MzYQ6fi/fbQkJUmZ5+QJAlVpkTWbjbhi A==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="287308845" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="287308845" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 00:53:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="619696411" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga002.jf.intel.com with ESMTP; 22 Sep 2022 00:53:14 -0700 From: Naga Harish K S V To: erik.g.carrillo@intel.com, jerinj@marvell.com Cc: dev@dpdk.org, stable@dpdk.org Subject: [PATCH] eventdev/timer: fix adapter stop function Date: Thu, 22 Sep 2022 02:53:11 -0500 Message-Id: <20220922075311.4127874-1-s.v.naga.harish.k@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 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 adapter_stop function is stopping the adapter service using rte_service_runstate_set() api and waiting until rte_service_may_be_active() api returns stopped state in an infinite loop. This results in hang issues if application calls rte_service_lcore_stop() before adapter stop. remove the state check after setting the service state which avoids running into hang issues. This also makes timer adapter stop inline with remaining adapters. Fixes: 47d05b292820 ("eventdev: add timer adapter common code") Cc: stable@dpdk.org Signed-off-by: Naga Harish K S V --- lib/eventdev/rte_event_timer_adapter.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c index d2480060c5..8266003ab1 100644 --- a/lib/eventdev/rte_event_timer_adapter.c +++ b/lib/eventdev/rte_event_timer_adapter.c @@ -1036,10 +1036,6 @@ swtim_stop(const struct rte_event_timer_adapter *adapter) if (ret < 0) return ret; - /* Wait for the service to complete its final iteration */ - while (rte_service_may_be_active(sw->service_id)) - rte_pause(); - return 0; }