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 B0575A2E1B for ; Tue, 3 Sep 2019 08:05:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AB4AD1DFE7; Tue, 3 Sep 2019 08:05:02 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by dpdk.org (Postfix) with ESMTP id A0FA31DF97 for ; Tue, 3 Sep 2019 08:05:01 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id b10so2329021plr.4 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=O0FpSiPEogrywYSa9afWSb4wPkwOqONepndI8qUw8msiBjX5bcrw4AMfelR3RRgoGa SwnOJpZ/6lYqcqQnjAfs0MV+jqUFlAzigJ13ZedzGCHoo4Nltdz0G2AC4FDEqBIEm8Iv HDmGvFAOzs1TnP7a05AJllE2WWRu5wOJk11Tj0m155moZXM/wbAKDGU31/i24JT6uT7F Pm4eY057shhGrJr/hg4C8HD6tL2aUWAD1b4cL0WbqOimSAkaFowKQPPJNX9CD48ipawP Am4f85yA5C+BX0b3VXv/yw12T59mvXe5XM7y0WL8a7fx3RW+MEU9A/yswGNnwDRQm71W wtjg== X-Gm-Message-State: APjAAAXa665FIUMP2TD19vcBTAw22ZNq9oWSYMh3X7bgYmJstKU17ZY6 MCoC6R60T+Ijp5D2Xe2WnTnIkA== 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-users] [dpdk-dev] Stopping DPDK Timer [RTE-Timers] X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" 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.