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 59480A00C2; Wed, 17 Mar 2021 07:10:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 050DE40A4B; Wed, 17 Mar 2021 07:10:11 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 5847B40689 for ; Wed, 17 Mar 2021 07:10:10 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id t37so13355867pga.11 for ; Tue, 16 Mar 2021 23:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=W0W05wuX4/vxk8PktZinmwVwTy0gtM9bceVKopNWOPU=; b=EOHZ2W6l0JwxZQNkmFG5XvuddaM37OMuw0FPfVjXNDC9UZHylZhc48wG8hBCjAz79f ICicOa/UJoDbXNlig1uiwooAaLddOejWi0iqV/FvqbOMoB0Uq7nvtA9+pZ59WowtuDfp VZ9ylFPKiTmlkXWaMv5A8Xw9doT+euFuJwfRipQn62nU30ScjmOgBhfgCToyTKBA6fXu L1lJYbxBvfheji46pwVPHCVFjWVD9+9RYc6w1A951L17VtKr4NT/PAGcYdIwB6tuUWTT gr8uoKbVLe18p7vTGVb5QbTBtZk6PMBvHTtB5QiHaNqQRbOlhpHKurAPyOxgrZbYNapp orXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=W0W05wuX4/vxk8PktZinmwVwTy0gtM9bceVKopNWOPU=; b=mtE5dHV+AVGnefcFyY/ipfu+XVsTN2wmH+G5YPAFg/cO++rlvYNlEV3NSIaR42DAEc B/cqk3PjiGJQ7vVWfeE/oBA1f2IpZOaFrCMc1qTCcX9msU8zzit7AunRGGpaxhnHpe4b qewLffWZNCHgnYpIMaEm85hS3Q1PWUbbY/eLs7ykmHaQ9RfQkArNLbS/WLW5s1+tueeG im+fO8xho47bkDAySc3WUgioPEj1zeJLDRFwZybUEl38JMoBed/Zn+5+bB2PH/6VSF9t aj83S3xbj1m8gvxxVcHABpYxIPsFINgeTeoJwWIefyptUz6EudDIegovm9jlSstIQ7MU VV4A== X-Gm-Message-State: AOAM531CxD7mVUNVqcLukpGVDtI3J0Jw1uRLIrMfo5swScgmHi+slz+3 8doTlLuYyMH48TEloXMQZq8= X-Google-Smtp-Source: ABdhPJxhW4oo9m/P+nbMruVCifRiM/+7S3zjPeGrbUJ/jK2DOU1UbsVHSISssJxzCOhNZGoLz5KIOg== X-Received: by 2002:aa7:8e43:0:b029:1ed:447c:f1d4 with SMTP id d3-20020aa78e430000b02901ed447cf1d4mr2788911pfr.16.1615961409580; Tue, 16 Mar 2021 23:10:09 -0700 (PDT) Received: from BG-LT7405.marvell.com (117.205.98.34.bc.googleusercontent.com. [34.98.205.117]) by smtp.gmail.com with ESMTPSA id s1sm17754540pfe.151.2021.03.16.23.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Mar 2021 23:10:09 -0700 (PDT) Date: Wed, 17 Mar 2021 11:40:04 +0530 From: Shijith Thotton To: "Carrillo, Erik G" Cc: Shijith Thotton , Pavan Nikhilesh , Jerin Jacob , "dev@dpdk.org" Message-ID: <20210317061003.GA21@BG-LT7405.marvell.com> References: <20210308204543.2903723-1-sthotton@marvell.com> <3d202f9526dcb90ffbcd55fc4b5888989321b797.1615738894.git.sthotton@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v2 1/3] eventdev: introduce adapter flags for periodic mode 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 Sender: "dev" On Tue, Mar 16, 2021 at 07:04:16PM +0000, Carrillo, Erik G wrote: > Thanks, Shijith. I'm posting a couple of follow-up comments in-line: > > > -----Original Message----- > > From: Shijith Thotton > > Sent: Sunday, March 14, 2021 11:46 AM > > To: Carrillo, Erik G > > Cc: Shijith Thotton ; Pavan Nikhilesh > > ; Jerin Jacob ; > > dev@dpdk.org > > Subject: [PATCH v2 1/3] eventdev: introduce adapter flags for periodic mode > > > > A timer adapter in periodic mode can be used to arm periodic timers. > > This patch adds flags used to advertise capability and configure timer adapter > > in periodic mode. Capability flag should be set for adapters which support > > periodic mode. > > > > Below is a programming sequence on the usage: > > /* check for periodic mode support by reading capability. */ > > rte_event_timer_adapter_caps_get(...); > > > > /* create adapter in periodic mode by setting periodic flag > > (RTE_EVENT_TIMER_ADAPTER_F_PERIODIC) and resolution. */ > > rte_event_timer_adapter_create_ext(...); > > > > /* arm periodic timer of configured resolution */ > > rte_event_timer_arm_burst(...); > > > > /* timer event will be periodically generated at configured > > resolution till cancel is called. */ > > while (running) { rte_event_dequeue_burst(...); } > > > > /* cancel periodic timer which stops generating events */ > > rte_event_timer_cancel_burst(...); > > > > Signed-off-by: Shijith Thotton > > --- > > doc/guides/prog_guide/event_timer_adapter.rst | 15 ++++++++++++++- > > lib/librte_eventdev/rte_event_timer_adapter.h | 11 +++++++++++ > > lib/librte_eventdev/rte_eventdev.h | 3 +++ > > 3 files changed, 28 insertions(+), 1 deletion(-) > > > > diff --git a/doc/guides/prog_guide/event_timer_adapter.rst > > b/doc/guides/prog_guide/event_timer_adapter.rst > > index a95efbe0d..0b2add6f7 100644 > > --- a/doc/guides/prog_guide/event_timer_adapter.rst > > +++ b/doc/guides/prog_guide/event_timer_adapter.rst > > @@ -138,6 +138,17 @@ This function is passed a callback function that will be > > invoked if the adapter needs to create an event port, giving the application > > the opportunity to control how it is done. > > > > +Adapter modes > > +^^^^^^^^^^^^^ > > +An event timer adapter can be configured in either periodic or > > +non-periodic mode to support timers of respective type. A periodic > > "...timers of the respective type..." > Will change in v3. > > +timer expires at a fixed time interval repeatedly till it is cancelled. > > +A non-periodic timer expires only once. Periodic capability flag > > +``RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC`` is set for adapters which > > +support periodic mode. To configure an adapter in periodic mode, > > "The periodic capability flag, ``RTE_EVENT_TIMER_ADAPTER_CAP_PERIODIC``, can be set for implementations that support periodic mode if desired." Will change in v3. > > > +``timer_adapter_flags`` of ``rte_event_timer_adapter_conf`` is set to > > +include periodic flag ``RTE_EVENT_TIMER_ADAPTER_F_PERIODIC``. > > "...include the periodic flag..." > Will change in v3. > > Maximum > > +timeout > > +(``max_tmo_nsec``) does not apply for periodic mode. > > + > > Retrieve Event Timer Adapter Contextual Information > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > The event timer adapter implementation may have constraints on tick > > resolution @@ -229,7 +240,9 @@ Now we can arm the event timer with > > ``rte_event_timer_arm_burst()``: > > > > Once an event timer expires, the application may free it or rearm it as > > necessary. If the application will rearm the timer, the state should be reset - > > to RTE_EVENT_TIMER_NOT_ARMED by the application before rearming it. > > +to RTE_EVENT_TIMER_NOT_ARMED by the application before rearming it. > > +Timer expiry events will be generated once or periodically until the > > +timer is cancelled based on adapter mode. > > > > Multiple Event Timers with Same Expiry Value > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h > > b/lib/librte_eventdev/rte_event_timer_adapter.h > > index d2ebcb090..b34dc1385 100644 > > --- a/lib/librte_eventdev/rte_event_timer_adapter.h > > +++ b/lib/librte_eventdev/rte_event_timer_adapter.h > > @@ -151,6 +151,12 @@ enum rte_event_timer_adapter_clk_src { > > * @see struct rte_event_timer_adapter_conf::flags > > */ > > > > +#define RTE_EVENT_TIMER_ADAPTER_F_PERIODIC (1ULL << 2) > > +/**< Flag to configure event timer adapter in periodic mode. > > I think this could be elaborated on, perhaps like: > > "Flag to configure an event timer adapter in periodic mode; non-periodic mode is the default. A timer will fire once or periodically until the timer is cancelled based on the adapter mode." > Sounds good. Will change in v3. > > + * > > + * @see struct rte_event_timer_adapter_conf::flags > > + */ > > + > > /** > > * Timer adapter configuration structure > > */ > > <... snipped ...> > > You should also be able to mark old versions of the series as superseded. Also, there were a couple of coding style warnings on the second patch in the series regarding block comment syntax. > Will do. Thanks, Shijith