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 9D9FDA00C5; Fri, 4 Nov 2022 11:58:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8118442D10; Fri, 4 Nov 2022 11:58:35 +0100 (CET) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by mails.dpdk.org (Postfix) with ESMTP id D845742D0E; Fri, 4 Nov 2022 11:58:34 +0100 (CET) Received: by mail-qk1-f178.google.com with SMTP id g10so2793223qkl.6; Fri, 04 Nov 2022 03:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vSwVORdl0Du0PXCsIOOex5x8UZ+wFpmhqMETjyI5/DQ=; b=RoNi5SFOr1Dy/aW2ii1Ehu6g8fI01yaMVl/XiQQ3N86OFDh7M31COb3fD00/caLyIA jwBGNReWb1+9AcITWnokdtN9fEUCfOFvUoXqWCiQYw7Eeuzj5CaWwk7TQsvOG5orvNE3 8bZUWtwnLPCJasRXDAV2BW5sMJjCayVhVexT0aNJ+KSfnfkG83ftb2c/AcQ/j6oLYTp1 XeKCsgy5uiJj9iZi81mlxIYVtwz6uhdsB3XgkFcbxjhQOKwY4R0+zZv8o7KcdFdP/E9G pnDXn2jlD5B3uxeX0h18w5mkMvgZ+YEHdtFeofnWHb28XZOdVZgN/J0wXgTMQ9tModmI HlTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vSwVORdl0Du0PXCsIOOex5x8UZ+wFpmhqMETjyI5/DQ=; b=Kpqtyt7k1K3NNZk8vmpYw/65cjodw8R0mEjmiQ6bz4FBpIWRAdaSTrseUPOOarpQmX FNIrZinOn0qlJIFHggpChRRL8rKRrfAqYjKQxcL51EftGrIQx5PCTYKWtZ2Bs/+pmmxX XwV9Qy9CkZ5TgfRAqpC2s2YL9kAxgfHQ4hr1taACAitPFQTGkTmraUwNn6FNv/aRTKwD WpulJWfpmqACLtRJEWEEwrDXs1PwNbfGqJEbbI4w6GfQ2X8c0iN9x/Iv6VA9UrPD4cAQ FeXxzVIQ6Nd40duSzp6tu294QGl2RvwczkzqqEE0wNYVWQcJmc+esr3vcuqQig53Uwwg Ub0Q== X-Gm-Message-State: ACrzQf0fRD6OYZw+y93gdGqo6rg7OSgINxfYUVWBtraLePClYqRLXB0X Y7QMIVdiBvH6BxHHhJkjtqGvwX71VtMANfJOkkI= X-Google-Smtp-Source: AMsMyM4ZN/COiSdBA3D09QZRx9MtOR1YbmjV0cjFzBdVBWs7C3RhmN4prO97KF7EcjEipzibrCI2Vx3K5xcKKSfC2WI= X-Received: by 2002:a05:620a:222c:b0:6fa:5a1c:4168 with SMTP id n12-20020a05620a222c00b006fa5a1c4168mr10624156qkh.283.1667559514180; Fri, 04 Nov 2022 03:58:34 -0700 (PDT) MIME-Version: 1.0 References: <20221101093340.41134-1-mattias.ronnblom@ericsson.com> <20221104065237.45594-1-mattias.ronnblom@ericsson.com> In-Reply-To: <20221104065237.45594-1-mattias.ronnblom@ericsson.com> From: Jerin Jacob Date: Fri, 4 Nov 2022 16:28:08 +0530 Message-ID: Subject: Re: [PATCH v3] doc: fix minor issues in the event timer adapter guide To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: Erik Gabriel Carrillo , Jerin Jacob , dev@dpdk.org, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Fri, Nov 4, 2022 at 12:26 PM Mattias R=C3=B6nnblom wrote: > > 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=C3=B6nnblom Applied to dpdk-next-net-eventdev/for-main. Thanks > --- > 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/p= rog_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 =3D { > .event_dev_id =3D event_dev_id, > .timer_adapter_id =3D 0, > + .socket_id =3D rte_socket_id(), > .clk_src =3D RTE_EVENT_TIMER_ADAPTER_CPU_CLK, > - .timer_tick_ns =3D NSECPERSEC / 10, // 100 milliseconds > - .max_tmo_nsec =3D 180 * NSECPERSEC // 2 minutes > + .timer_tick_ns =3D NSECPERSEC / 10, > + .max_tmo_ns =3D 180 * NSECPERSEC, > .nb_timers =3D 40000, > - .timer_adapter_flags =3D 0, > + .flags =3D 0, > }; > > - struct rte_event_timer_adapter *adapter =3D NULL; > + struct rte_event_timer_adapter *adapter; > adapter =3D rte_event_timer_adapter_create(&adapter_config); > > if (adapter =3D=3D 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 expi= res only > once. The periodic capability flag, ``RTE_EVENT_TIMER_ADAPTER_CAP_PERIOD= IC``, > 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 >