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 5F9F4A0597 for ; Thu, 9 Apr 2020 16:57:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4015D1C2BF; Thu, 9 Apr 2020 16:57:19 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by dpdk.org (Postfix) with ESMTP id D9EDA1C2BB for ; Thu, 9 Apr 2020 16:57:17 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id m13so5083568pgd.8 for ; Thu, 09 Apr 2020 07:57:17 -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=d1eiAMoKNERVnPlVQ/uBqy/a6lMZFOhB84q4UZ+zvCs=; b=BiKh/AKFCy2pFGcb5uXOQSfgrS4vRrhZAaVpbXDxdtBsWvitWtD3aei+5ol8A6uALs Nllw0wUBa/egXAJwgesi6ZRR328VqgZ2R6C2WX9q4eiL/guF4Ry9uXifLgwWIk/ifRGj PT8bd1UOgaAn9uWD30gQ/G7EgyhdkZMJWqLi1Rb2FPegCh00CDy4QyNYxEuHGU5r02vk 1f8QEBoRjUmdBmIDhIOOz4Rtyly3TjkGjCKnFd2kkXglC1hOhTA9N3yMzUCmsSZUZxsT tkTlqdIOc7lVd5SRfu9IAPWdZolB6tiS9FuKjCZDTOpihgbzZmsZc/HX754kbtRBU+Pm ZNTw== 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=d1eiAMoKNERVnPlVQ/uBqy/a6lMZFOhB84q4UZ+zvCs=; b=JfOCvOM2GTHzHcBGHKjqx8AoSUxeK7UF1t46NeuWN2UFtR2jxWOb54on1HrFs2zRbx r+GkkKpoarZajdL9Bnhx7W9r+P1tjMFfKuhujsymDE3Y/+8KBgRxnvg89jENy0uPUUAW Q+ONfoF+joe6yTSGGKvZYzj+HnMzruujAWxIkOph+EoWuoxesQTJl7OZn1N6AQOyNwTB +azYRnEjVhI3cYbeLBetdJTwyNp5u1fM4r+6ZQbvAVVWXCRAmeUwVgS+0Gfix9TGqwOf UpdD/xRbYh6YG1IDirEBSRr+6bdPMHm51FMYsgakNNuNLgWYC1jQuaEJKZGh5PuzjXHl WKOQ== X-Gm-Message-State: AGi0PubibaKAR5mzBroyEgkGgGvL5+7ZZlvh2V0z7GhPUFVdD9XHzv+6 bSQOIbd79ojG2xD7T2TUcpB/pA== X-Google-Smtp-Source: APiQypKYW93MlE3ZBMSrSsJPqQVLGVZq0volFfYWS4wN4PFyTPE2Xxaqns+m2HHuLsCDXhaanz9bMA== X-Received: by 2002:a63:34c9:: with SMTP id b192mr11078783pga.275.1586444236889; Thu, 09 Apr 2020 07:57:16 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id v26sm19334657pfn.51.2020.04.09.07.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 07:57:16 -0700 (PDT) Date: Thu, 9 Apr 2020 07:57:08 -0700 From: Stephen Hemminger To: Archit Pandey Cc: users@dpdk.org, "Mohit P. Tahiliani" , Gokul Bargaje , Tarun Anand , sanjana.krishnam@gmail.com Message-ID: <20200409075708.6e4e3175@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Calling timers from a library 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 Thu, 9 Apr 2020 11:37:12 +0530 Archit Pandey wrote: > Hello DPDK users, > > I'm building a library for DPDK which utilizes periodically called > functions using the dpdk timer facility. Currently, I'm using the master > core on an application to call timer_manage() and run the scheduled timers. > > My doubt is whether its possible to call timer_manage() from inside the > library to run the scheduled timers. This would allow for a much more > streamlined design. An issue which comes to mind is that my library is not > aware of the cores it is being run on, hence I cannot use > rte_eal_remote_launch() for a function that calls rte_timer_manage(). > > Any help on how I can do this would be greatly appreciated! > > Thanks and regards, > In my experience, once you start running DPDK functions on non-DPDK threads lots of things can break. The DPDK threads are pinned to a core and therefore don't preempt each other. For non-DPDK threads they are not pinned; therefore a DPDK library or other code using rte_spinlocks can get preempted with and self-deadlock.