From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A48B9A2E1B for ; Tue, 3 Sep 2019 08:05:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB7E81E553; Tue, 3 Sep 2019 08:05:03 +0200 (CEST) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by dpdk.org (Postfix) with ESMTP id A3FCE1DFE7 for ; Tue, 3 Sep 2019 08:05:01 +0200 (CEST) Received: by mail-pl1-f176.google.com with SMTP id t11so1322693plo.0 for ; Mon, 02 Sep 2019 23:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ux9xAYKwSWf7pRaa+F569xCWzb1wMAboUeVl8bF4aM0=; b=c7isjfi4Dus9b/KnFF+bqsXZZ9ErvevnunCdpHQDy5N9CeL6sYirvdw+P9KmN9/iYP VGdw+0rcmCDC//pHDbjMwQsWCj3nQs1CKNA8Mk22q/kNGNlytp270Wp7X3Yz/esXJdlH SRqZvaCBKVSwhEpP/fj25lmfPKemsSo9mEDVb1O8AaPREKNRbDSi2CSqRrqo8agljPdu a5LxeHMoNAuuShxVLBAfzt/lLTHtxx29VBM3agMQ2/WdP4da5XtrWEU3sIS369jc8qTn aULQd687U6FzyHoM3VgW10MecE3j0wyHPK5aevEFtPdaoxmmDTF1ber2Egwar7ofUJLQ FyjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ux9xAYKwSWf7pRaa+F569xCWzb1wMAboUeVl8bF4aM0=; b=Y6x3nKR0HEQoOO+okSie2lZj6Hgc4BPrNtnBgB+pJCUG4MD0QU8DMhFvLf9tGOySAd YonEovRdolJCPKdjWFSQRenLvqymUSpfzYaR/FKmPmguhsWuwiVGZsBM8mZvYFnNFAIo jWjJzd8V7s71ndoT1hZdfWJOw+7VgC4jIm3LjwEBrvISRMiZl8AN7hX1mvvkkOZxruFS OICKnrK2ybK7LAG6tkCVm1ZJH1sH9K29a3TtHpd+fFTs0QPJojzsWadRmdMRFikIjUjV P4T4oyauZMDpGps+tVfliMcCwhMVxkO55ead+fZEOhCIaFmrV8zyl+OaAJxLw8XkB3WX GgXw== X-Gm-Message-State: APjAAAVA9e9eKKYQtBPr+21sAubXr40bNO6P/5WpgRKICD7V4x9zcoVA 1zrZySglHdmDrfJFlSJua0XGEA== X-Google-Smtp-Source: APXvYqynbyOzxrw3jRn4PffJ/GLotf3kWXE+V4E2BfuVjVl742lioBPqPXUOWt8XVxd/OKygsUIvrA== X-Received: by 2002:a17:902:a706:: with SMTP id w6mr4570820plq.166.1567490700675; Mon, 02 Sep 2019 23:05:00 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j5sm13712689pgp.59.2019.09.02.23.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 23:05:00 -0700 (PDT) Date: Mon, 2 Sep 2019 23:04:57 -0700 From: Stephen Hemminger To: Suraj R Gupta Cc: Bruce Richardson , users@dpdk.org, dev@dpdk.org Message-ID: <20190902230457.62717be8@hermes.lan> In-Reply-To: References: <20190902112214.GA631@bricha3-MOBL.ger.corp.intel.com> <20190902151429.GB631@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Stopping DPDK Timer [RTE-Timers] X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 3 Sep 2019 10:21:17 +0530 Suraj R Gupta wrote: > These are the links to Timers documentation. > https://doc.dpdk.org/api/rte__timer_8h.html > https://doc.dpdk.org/guides/prog_guide/timer_lib.html > > As per my understanding of the documentation, > PENDING means timer is scheduled to run but not started.(in a list) > RUNNING means timer is presently running. > STOPPED means timer has stopped and callback processed. > > rte_timer_stop() can be used from callbacks for stopping the timer even in > case of periodical(multishot timers) > my use case is for a single shot , where i have to stop the timer in middle. > rte_timer_manage is what that drives running timers. You can't stop a timer in the middle through DPDK. But you could set a flag on one cpu and test that in what ever long running loop you have in a the timer. Having a long running loop, kind of defeats the purpose of rte_timers which are meant for short running callbacks.