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 0B284A0542; Fri, 4 Nov 2022 07:56:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B3B642D10; Fri, 4 Nov 2022 07:56:30 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2049.outbound.protection.outlook.com [40.107.22.49]) by mails.dpdk.org (Postfix) with ESMTP id 3B61242D0E; Fri, 4 Nov 2022 07:56:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GCA530Fw+7gd4/iEPKSyXMGySnxiuOr0Q5trNwSXe6Adg6d+uvYPFA0tLoSE5ojOr/CGcS8UG6nSqzS1M6zl7Nd8XJt6kzVlHAjYnR9j1eXfd3SRQpe2Ku5/+/0UZlcbujZZl2x7msGawiWza+ZAlWWCCEotAyjFiQzowbnVbNkTUGByEgFWs5TXwX8jaEF54PhO6Py5EpARlfbq/f5j6j9P7fk2eGGqOZruDVfCJXYduN2r841QWH5pp9sTbSF8yYuWOa4XYLTvq6xFh/QYEK+zIU1xSnxsA3R89/AVN1gJ3+ncq0L2nI0fAbGFq8/oO4GnLY/UVmo8/wDKGP+H0Q== 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=My0oSwMei8Wk0XRuIcQVWnqUQchC38mP9IaNOw2rR1k=; b=NWsKn938rGubdfJ+9yG/PeL5JCce8duGB1P/m18aUkjf78ZW8+WVv/caBdHyvcATxfl3OUus8FdfHSfnrbx/x0kQgK3nHyhPuFzZkrW92VB5VPy0RDR2KzPT05icmaaSYKAHIxYnPo3HqPipKvsSBU7jIZN+Z5IzEh2Sa0sS30NtODfZ/7VbwyzwLEg0bUw08SCp+4EeEnBWQUDY/h3nofiajN8jBvrglmDGsTlvUvpCDKrM4Zqq6h7shT4HzcW46tRyWpLpHf7NIeft3coXFaxP4rzmeGtWaub7moEtfMHpljHPCkL7sjT4C2R5xROrLR1Keis+ZbVlutHT96zKkg== 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=My0oSwMei8Wk0XRuIcQVWnqUQchC38mP9IaNOw2rR1k=; b=JYqqNq9sClFnDynC5igEz3R0Ks/CXmZkCdHtUfP4pVQJ98XVpsezC4aSVuiOshuxHp90uvnpIcLQDZCRF1r6o2zmRo9F4v4DTRNo/tOVTkqptrQeSVG4EJu6kuVYjBy/NMdGm9sdDut9wF8JkVq3ulyLOJBERBaUwZ2Cs/tGRUA= Received: from AM6PR01CA0037.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::14) by AS4PR07MB8708.eurprd07.prod.outlook.com (2603:10a6:20b:4f2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20; Fri, 4 Nov 2022 06:56:27 +0000 Received: from AM0EUR02FT022.eop-EUR02.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::ce) by AM6PR01CA0037.outlook.office365.com (2603:10a6:20b:e0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22 via Frontend Transport; Fri, 4 Nov 2022 06:56:27 +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 AM0EUR02FT022.mail.protection.outlook.com (10.13.54.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.5791.20 via Frontend Transport; Fri, 4 Nov 2022 06:56:27 +0000 Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESSMR504.ericsson.se (153.88.183.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.32; Fri, 4 Nov 2022 07:56:26 +0100 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.187) with Microsoft SMTP Server id 15.1.2375.32 via Frontend Transport; Fri, 4 Nov 2022 07:56:26 +0100 Received: from localhost.localdomain (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id AA0CF380061; Fri, 4 Nov 2022 07:56:26 +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 v3] doc: fix minor issues in the event timer adapter guide Date: Fri, 4 Nov 2022 07:52:37 +0100 Message-ID: <20221104065237.45594-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221101093340.41134-1-mattias.ronnblom@ericsson.com> References: <20221101093340.41134-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: AM0EUR02FT022:EE_|AS4PR07MB8708:EE_ X-MS-Office365-Filtering-Correlation-Id: 849100bd-9ba3-47f3-1885-08dabe31b1eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d7xYcS4zrFyaP3pC0xBd3qkrOIx7yCMQhZAfdSLF/UuUaCMYL+YWBXtQwfRxwaYbHrfDzeKlZ6yugiZ/kPD4Up6poDejchNO/tg4I7EwMQy/WqWPrgHlTOQvCFdXVp3jevs8ACow/70bElxWQw+sCOZGEtrTUek6L1kYzjoayHdtGowux0MrFZI3VNefZo3GrK0PzV9YmhL7k7w/IHE1fOd9mDECGPmz9fum7pKgnaBs5BhjCg46Mji7rfAIy7X8ezre2c0f+7UBz8Eq1EEW71fcRAkm2+XhhqLnXtqrVv9ExCXn6MvYDeQ6ivMFXdC89DauLl8Y3TSGQz1QyHdF09V7LF+w+xTFYKJ+XXcLjz7XTLVS+B91jSd30NubAvPkrJPO/PTI7MPHhq+91Xsz2Ti7P5Q7Ynjss5OK1EXrj2D4HEemWMZQDWBKS39Koa8Zh8yWiB9kodcJCMnx4C0AD+sEwvZE+yKgXrHLfES1Fsba+meS0Np21DyNvGudO5wLniyjrvmbP44YH2ncOhGINfwTdnJggNBA6Nravr7pWJEdZHo+4PHEPF8imoxNRMI4a7aDNT+DdI4Xj4xGfFd1aFzop8neVYI8B5nWXoCpSPu449PZGFXWInWURmn6vVPDhO0fUK1FSgAAGSnvtSE6ShieEDQFAkhJcjwjeddmM+j3M65mg/HysBATNPmzJMHNJtM9h5xUpITZrwZPB7UZKiR/i0GKID6k6TnflbuS2RJfBHo6cii/ZlZvvT8dU37oLd5dHtDC80OZkv/VkMxtIQ== 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)(346002)(396003)(39860400002)(376002)(136003)(451199015)(36840700001)(46966006)(40470700004)(83380400001)(47076005)(186003)(2616005)(1076003)(107886003)(6916009)(6266002)(36860700001)(40460700003)(26005)(336012)(8936002)(40480700001)(5660300002)(70206006)(316002)(478600001)(6666004)(41300700001)(54906003)(8676002)(70586007)(82310400005)(4326008)(82960400001)(82740400003)(2906002)(86362001)(7636003)(36756003)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2022 06:56:27.3370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 849100bd-9ba3-47f3-1885-08dabe31b1eb 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: AM0EUR02FT022.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR07MB8708 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 text, the flags field of the conf struct was erroneously referred to as timer_adapter_flags and the max_tmo_ns field as max_tmo_nsec. v2: max_tmo_nsec -> max_tmo_ns fix. v3: Another 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 Acked-by: Erik Gabriel Carrillo Signed-off-by: Mattias Rönnblom --- doc/guides/prog_guide/event_timer_adapter.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/guides/prog_guide/event_timer_adapter.rst b/doc/guides/prog_guide/event_timer_adapter.rst index 7547059a05..d7307a29bb 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,9 +146,9 @@ 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 +``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. Maximum timeout (``max_tmo_ns``) does not apply to periodic mode. Retrieve Event Timer Adapter Contextual Information -- 2.34.1