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 E959BA00C2; Tue, 1 Nov 2022 08:49:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8D5640223; Tue, 1 Nov 2022 08:49:27 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2056.outbound.protection.outlook.com [40.107.22.56]) by mails.dpdk.org (Postfix) with ESMTP id 799EE40156; Tue, 1 Nov 2022 08:49:26 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pc3SNdizeybEb8HmUkV4lu4SbM9oWr1VF7UC7UAb7jXfpdX7oySMXDLaTlL292ZTnPQXyKrhQjiahpHEnVFQckup0Xyj7cOiqXNPGPCCc0xyK0DflfzvX8L9wMyZi5UA+X5pK7Xfp5SP1R3K75PT1HnfUeK80YWOmZ55N2mGuJCPUbbFb700eoCRd7ZWPE31rRr/nWfONvw9m5EAGpZzS+0GF3jqclTydWPDFkLQtMccKsYd5xzlT6IRhUL/YWH+ZUjShwYtAA2P0ts67ObIEoGxRrUyVHgH/0QUxyR2dm1PkfTczNyQuaMldvXZjkM7SiglR6l5hHVSd9D3pGqo4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NdCTgDrtlDLPImMYEAygdG46yR8V1yeTcxpbxH+JYN4=; b=iziiXI1d4jNy3IsEalMHU+Cxc1Zdh/bGo9/F55+iCc7t1tdbWbUbqLw+hovYRPl09wX7NlAolVnbwBCVKv5eVN7nujH3K1tN4Y2oDdDfz/da9odnIHwZlNcVYTnSAFQxBOlbJ2TVzFdEjmWvRM4lnDNvWyd09vxjZRoxVlWJlifSBijryeabBCruRADLhZVCguRT5CsioVR9o4Zk//g+DKA4X8HLxuyFb2tbh4y2YDQxT1y5GouNdX0YYWuBPucDLRR2Jpnc8Q9hnGRjlfq6Vj04RPwiZFDExBhUoN9Ls5iuolUbESG3wUZTRtK4dbPPT868OJEfoEwZX012db8INA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdCTgDrtlDLPImMYEAygdG46yR8V1yeTcxpbxH+JYN4=; b=diOAeDoTw4tswShw+gV2MTTzpemvu89tTsUDktxDw+5dI06kzFXv9HsN00QFk0FXfmdsL3bWGNLv50CT379N2FdpGAHtHaSdW/lOmL9Kdw7opeHJYLrxjThg0LvijWbdLO+AQAgEigfjHcGHd+GqCpLvV2QLgOeSTWzf5dwaX5g= Received: from AM6P193CA0119.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::24) by AS1PR07MB8783.eurprd07.prod.outlook.com (2603:10a6:20b:47b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.10; Tue, 1 Nov 2022 07:49:25 +0000 Received: from AM0EUR02FT013.eop-EUR02.prod.protection.outlook.com (2603:10a6:209:85:cafe::6c) by AM6P193CA0119.outlook.office365.com (2603:10a6:209:85::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.21 via Frontend Transport; Tue, 1 Nov 2022 07:49:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by AM0EUR02FT013.mail.protection.outlook.com (10.13.54.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.5769.14 via Frontend Transport; Tue, 1 Nov 2022 07:49:25 +0000 Received: from ESESBMB502.ericsson.se (153.88.183.169) by ESESBMR501.ericsson.se (153.88.183.129) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.32; Tue, 1 Nov 2022 08:49:25 +0100 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.185) with Microsoft SMTP Server id 15.1.2375.32 via Frontend Transport; Tue, 1 Nov 2022 08:49:24 +0100 Received: from localhost.localdomain (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 02D741C0069; Tue, 1 Nov 2022 08:49:25 +0100 (CET) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: Erik Gabriel Carrillo CC: Jerin Jacob , , , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH] doc: fix various minor issues in the event timer adapter guide Date: Tue, 1 Nov 2022 08:45:28 +0100 Message-ID: <20221101074528.40898-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0EUR02FT013:EE_|AS1PR07MB8783:EE_ X-MS-Office365-Filtering-Correlation-Id: d21d7cad-a38b-4bf9-fa51-08dabbdd98f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vKICPyFUDU1t9wjHLiaEC6v9sfI9qGgrv9/WHsUivRqf6Cec4wTXrFjubuTDSHlwVSYiRcphKgy+c21gglNzHWDdI5iKLdRKysTf6DM2xNzS1IjPhT7tarnL0iwWTUjIXzo7iLuz3FTBSUCQ8NVCBt2EFdztt9n4FoKhEWNhAWydxtn7pY9tEmuv1UUl2oJU2VBN+keDZ4iHiicmBmU3bvZYmyl69ADhnXU/lcyYM3WJWgHusb9pZeqWz4bKPv4Aqxt9fSYJNgPl7G0q/q35ATnG2evLRj+P/elSSMCtONxYW5uu9kHrC4NeyFwuRZ6lHIWTR5p5wR9Vpv1UTsdOSBOVPxT++GkbNN4eNWbqEXh3DK15jdK1NBm1lF43uQZsesX1ZmYdpAA9+IqVoIAOus7Cjy/mG/gLsqE5VComq5aajrO/g0NAC+h0Rhz51CcVyfcoO/nI2fgQYdAzkalIi42n+fpDvp3UCwx7os4gVf5D9vbM7OHwBUoyJosetJmxtThbtbR/TIXZti+WzXY632NKq2yTgyqg2NAg/cFVxZCZnZgPySUaIgRZvomFeS66LgGOXsJuF7Nfry+m4Afqt67AttsJYXVfsTpFbc8lhraGIQgLYgoC9IfP7vi3YR63XSWjwyl0290wOqtwLl38gdJOuRdb+pFD9jpNxEp4R59hWMPVmCub+TKvzeyhVl255UFB98WrXj1yGHT+RIbZ/2IFzEndysAh8tBZwwaq4frf+qW7tABSY8CGUwshihO7rMCwcbJBQEMFQVyrD43WMg== X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(4326008)(82960400001)(8676002)(356005)(54906003)(86362001)(7636003)(40460700003)(36756003)(82310400005)(40480700001)(316002)(70586007)(70206006)(107886003)(47076005)(83380400001)(1076003)(5660300002)(186003)(2616005)(8936002)(336012)(478600001)(6916009)(2906002)(36860700001)(41300700001)(26005)(82740400003)(6266002); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 07:49:25.4407 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d21d7cad-a38b-4bf9-fa51-08dabbdd98f9 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AM0EUR02FT013.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR07MB8783 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org In the example: * Properly initialize the socket id field. * Remove comments redundant and/or not consistent with the code. 180 seconds is not 2 minutes. * Remove redundant pointer initialization. In both the example and in one instance in the body text, the flags field of the conf struct was erroneously referred to as timer_adapter_flags. Fixes: 30e7fbd62839 ("doc: add event timer adapter guide") Cc: erik.g.carrillo@intel.com Signed-off-by: Mattias Rönnblom --- doc/guides/prog_guide/event_timer_adapter.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst index 7547059a05..b28375855e 100644 --- a/doc/guides/prog_guide/event_timer_adapter.rst +++ b/doc/guides/prog_guide/event_timer_adapter.rst @@ -107,18 +107,19 @@ to ``rte_event_timer_adapter_create()``. .. code-block:: c - #define NSECPERSEC 1E9 // No of ns in 1 sec + #define NSECPERSEC 1E9 const struct rte_event_timer_adapter_conf adapter_config = { .event_dev_id = event_dev_id, .timer_adapter_id = 0, + .socket_id = rte_socket_id(), .clk_src = RTE_EVENT_TIMER_ADAPTER_CPU_CLK, - .timer_tick_ns = NSECPERSEC / 10, // 100 milliseconds - .max_tmo_nsec = 180 * NSECPERSEC // 2 minutes + .timer_tick_ns = NSECPERSEC / 10, + .max_tmo_nsec = 180 * NSECPERSEC, .nb_timers = 40000, - .timer_adapter_flags = 0, + .flags = 0, }; - struct rte_event_timer_adapter *adapter = NULL; + struct rte_event_timer_adapter *adapter; adapter = rte_event_timer_adapter_create(&adapter_config); if (adapter == NULL) { ... }; @@ -145,7 +146,7 @@ to support timers of the respective type. A periodic timer expires at a fixed time interval repeatedly till it is cancelled. A non-periodic timer expires only once. The periodic capability flag, ``RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC``, can be set for implementations that support periodic mode if desired. To -configure an adapter in periodic mode, ``timer_adapter_flags`` of +configure an adapter in periodic mode, ``flags`` of ``rte_event_timer_adapter_conf`` is set to include the periodic flag ``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. Maximum timeout (``max_tmo_nsec``) does not apply to periodic mode. -- 2.34.1