From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7052BC10F0E for ; Mon, 15 Apr 2019 21:42:38 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 01678206B6 for ; Mon, 15 Apr 2019 21:42:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01678206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA4871B39F; Mon, 15 Apr 2019 23:42:36 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id F08141B39F for ; Mon, 15 Apr 2019 23:42:34 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 14:42:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,355,1549958400"; d="scan'208";a="151130530" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by orsmga002.jf.intel.com with ESMTP; 15 Apr 2019 14:42:33 -0700 From: Erik Gabriel Carrillo To: rsanford@akamai.com, thomas@monjalon.net Cc: dev@dpdk.org Date: Mon, 15 Apr 2019 16:41:26 -0500 Message-Id: <1555364488-28207-1-git-send-email-erik.g.carrillo@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> References: <1551892822-23967-1-git-send-email-erik.g.carrillo@intel.com> Subject: [dpdk-dev] [PATCH v5 0/2] Timer library changes 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" This patch series modifies the timer library in such a way that structures that used to be statically allocated in a process's data segment are now allocated in shared memory. As these structures contain lists of timers, new APIs are introduced that allow a caller to specify the particular structure instance into which a timer should be inserted or from which a timer should be removed. This enables primary and secondary processes to modify the same timer list, which enables some multi-process use cases that were not previously possible; e.g. a secondary process can start a timer whose expiration is detected in a primary process running a new flavor of timer_manage(). The original library API is mostly unchanged, though implementations are updated to call into newly added functions with a default structure instance ID that provides the original behavior. New functions are introduced to enable applications to allocate structure instances to house timer lists, and to reference them with an identifier when starting and stopping timers, and finally, to manage the timer lists referenced with an identifier. My initial performance testing with the "timer_perf_autotest" test shows no performance regression or improvement, and inspection of the generated optimized code shows that the extra function call gets inlined in the functions that now have an extra function call. Changes in v5: - define default_data_id as const (Robert) - modify for-loop control in rte_timer_alt_manage and rte_timer_stop_all (Robert) - change parameter type in rte_timer_alt_manage_cb_t from "void *" to "struct rte_timer *" (Robert) Changes in v4: - Updated versioned symbols so that they correspond to the next release. Checked ABI compatibility again with validate-abi.sh. Changes in v3: - remove C++ style comment in first patch in series (Stephen) Changes in v2: - split these changes out into their own series - version the symbols where the existing ABI was updated, and provide alternate implementation with behavior equivalent to original behavior. Validated ABI compatibility with validate-abi.sh - refactor changes to simplify patches Erik Gabriel Carrillo (2): timer: allow timer management in shared memory timer: add function to stop all timers in a list lib/librte_timer/Makefile | 1 + lib/librte_timer/rte_timer.c | 557 ++++++++++++++++++++++++++++++--- lib/librte_timer/rte_timer.h | 258 ++++++++++++++- lib/librte_timer/rte_timer_version.map | 23 ++ 4 files changed, 794 insertions(+), 45 deletions(-) -- 2.6.4