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 42AC6A0544 for ; Thu, 22 Sep 2022 09:53:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39716410D0; Thu, 22 Sep 2022 09:53:35 +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 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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; } -- 2.25.1