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 0A259A00C2; Tue, 1 Nov 2022 10:37:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2BB24069C; Tue, 1 Nov 2022 10:37:33 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80047.outbound.protection.outlook.com [40.107.8.47]) by mails.dpdk.org (Postfix) with ESMTP id 913B740156; Tue, 1 Nov 2022 10:37:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dJcn6d/kJnXNhUueeHed633tgBNqiAlSPTIoqn4RrQzSm91kqd20dYX2lT8nyhZ5fPmwdK+2xN+5bQWxsLyXQqX43xSW6O+EkW3KKRzHGdjNLlL2vNd852jmUGwTumy3I402660u308byL78fatHvdpNfzKoDvoaTwgtaZEPxDeoBJ41t6iOghfEPFlk9uZlJWuYT2A+44WzOD2jtlWaHTfTOv2k3jYrGAbT37HBq6Dv9Fyj5QoRy4bZZOXKBtG/9mQhv0+X0RiAjhFTzeDOHBr7Abm9JliKePpo61YTxHOnYj/OkhouHtt9aNAyHRz/pedD90QbNol6fjUQrvr3fA== 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=aQEwC2HzZZYlZ8ByfiWhIdAk3ocznl3AgGBA47a2Aj0=; b=fzYZJ8TmEO26l1X+wc/B3qcziakUPLl/R4zTWpreMK1rPM00s3RjJ6zhBAjyhbAw6nzTDW02u0Lvp214aa+rph+93rbMLovedNDgN+gVRIfpZ5C6FC9Ij8vklrwWct5D1+4iMtwB80Jw5VtSaE4yUSTd3cXDz9/I7XPpcclh4+PWS8pKeEFOBuY/rvse8Nl5SLB9iEORyaIcG20ML5HFcdGc+SvtQ+PcBuyxUY5e4TiZsnvWGci+AIX4BpUVizULmwQPpMGvwPfFWgRfGLYbLtMuGs1kW8b+6kuKwiWHGwfCyMUo3S76rLLTFCbo+IpTLUkBVJiiEaFzYq+7x31kuA== 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=aQEwC2HzZZYlZ8ByfiWhIdAk3ocznl3AgGBA47a2Aj0=; b=onSYoVj2wWQ5Qpyx4DZcf38HqC8xU5S+TYZP57CcUuJN/mQEcKZ20qAPsjjnaaLdId/TL28vu1zI06D3UXEu4uHXxn76YdpAA0DdGIYdBS6DFjWax5fx7EKfQKAUFDL+lamNAc/Yp1RR6s2Qdp744VfZyTgJhhSdYqIRvZmbwoU= Received: from AS8P189CA0046.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:458::18) by PAXPR07MB8337.eurprd07.prod.outlook.com (2603:10a6:102:230::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.19; Tue, 1 Nov 2022 09:37:31 +0000 Received: from AM0EUR02FT028.eop-EUR02.prod.protection.outlook.com (2603:10a6:20b:458:cafe::4a) by AS8P189CA0046.outlook.office365.com (2603:10a6:20b:458::18) 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 09:37:31 +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 AM0EUR02FT028.mail.protection.outlook.com (10.13.54.154) 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 09:37:31 +0000 Received: from ESESBMB503.ericsson.se (153.88.183.170) by ESESBMR505.ericsson.se (153.88.183.201) 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 10:37:29 +0100 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.186) with Microsoft SMTP Server id 15.1.2375.32 via Frontend Transport; Tue, 1 Nov 2022 10:37:29 +0100 Received: from localhost.localdomain (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 0A67A380061; Tue, 1 Nov 2022 10:37:29 +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 v2] doc: fix minor issues in the event timer adapter guide Date: Tue, 1 Nov 2022 10:33:40 +0100 Message-ID: <20221101093340.41134-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221101074528.40898-1-mattias.ronnblom@ericsson.com> References: <20221101074528.40898-1-mattias.ronnblom@ericsson.com> 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: AM0EUR02FT028:EE_|PAXPR07MB8337:EE_ X-MS-Office365-Filtering-Correlation-Id: 97dc1d9e-9a7e-4ba3-fbac-08dabbecb2b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QQei+j1fbZUgHk9lUxut1C8zH8WPa0RSbNxxY/a2dM8mcaqgB+M1xf2zod7ktiNsyIgkqOHjI5QtwZiLdwkRjagiMydBHhouN7UHFmQwOQS39lEfn3GT/Q5b03YXMKQoblE28s6ACNlL2tiU4uWy4XJRfRjm6okbM94zDY/gmMwuCcxpLq2/6Q4IdNJKy/majNvuDlx2FIZDO7ujCAvMzHhUvH5vGt8BaVoymSK6M/9ZOwJYixNQ7F7GXGFyZa8q+kVmy26i8K2MGtXqkiBE1ELmDairlvZEAirQj+ZnzgeZ/X4IsCTEUAx8KkEAtopvpHNr2KcmYNeAt7VrlzCp069OgDDHcZXETROurLtzdBfcoAFzb292IYzv9jllKQbS+uhguW2R1EReLfMUz+rh/5/HrBDBh5yi9RfiBOnCFJJqbmGBtUFLw62KMA34dbGFQ3sZwhl1Whbz8MPidTnqJFWNcEMb+n6AYZ2OnSKtcpVg92Ki3J4ERpdDwnyNzcEqB4L61rjI731ReQ8SZYGsA8EWadGhlf3CTC3Y5UcKY5N/u7ZaieqpvoxnmURYIKAGR9pi14TJ9h7FIYtXgSIZDIO2OUMncTUOGAGNEvvKTkhjVzOa02PO0FV5l1tTwNHVylABqexui2YCoNzLuZ0+NvjVkysQ/7LSP3vLUr+PVL1U1qcjcSYy/vUAtC4OMZPV67U2Ky8SCo3CGmj8gUq6JWl5lcbVoKUEb25dmecaxg/RykjY1W833wpt3PZ726MVBwV574JQdiDoy3v5qHKVY7gkMJNjHSqV2NYhUO6PcEqgkds94XIQlTzQjVJcnSQ+ 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)(376002)(136003)(346002)(39860400002)(396003)(451199015)(36840700001)(40470700004)(46966006)(6916009)(316002)(54906003)(478600001)(70586007)(107886003)(1076003)(186003)(70206006)(4326008)(8676002)(41300700001)(6266002)(36756003)(8936002)(26005)(5660300002)(82310400005)(2906002)(2616005)(336012)(47076005)(66574015)(40460700003)(83380400001)(36860700001)(82960400001)(6666004)(356005)(82740400003)(86362001)(40480700001)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2022 09:37:31.0602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97dc1d9e-9a7e-4ba3-fbac-08dabbecb2b4 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: AM0EUR02FT028.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR07MB8337 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. * Access max_tmo_ns with the appropriate name. 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. v2: max_tmo_nsec -> max_tmo_ns fix. Fixes: 30e7fbd62839 ("doc: add event timer adapter guide") Cc: erik.g.carrillo@intel.com Cc: stable@dpdk.org 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..4cba5f1cd1 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_ns = 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