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 CD9C3A054F; Tue, 16 Mar 2021 20:04:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9916640A4B; Tue, 16 Mar 2021 20:04:21 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id E2E87406A2 for ; Tue, 16 Mar 2021 20:04:19 +0100 (CET) IronPort-SDR: ZTfL8BN3QDoPcj53jkZkdfYMsShgzBWAXrAgdUIX2n3xQ2DH/k9qOGOacAxHE7CddPR8IBAsPM QBiPdZLr5org== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="169235084" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="169235084" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 12:04:18 -0700 IronPort-SDR: Cpfb6yj5esE2AJJoYBbfWibrjAXEPzoJj3fzSdfSwR7DiU+xCpIIYrSRun8bvahJUuz0J8ZwW4 tWQ9xxTD6OFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="440177826" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by FMSMGA003.fm.intel.com with ESMTP; 16 Mar 2021 12:04:18 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 16 Mar 2021 12:04:18 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 16 Mar 2021 12:04:18 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.59) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 16 Mar 2021 12:04:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X74t2WbDK/ioiS3O2E38QzpLdFGORtNNOqhdb7E8M5wCm9Nx+ZDvOLKN+uiLCQVZ8T0YqlhGVvege7/4HagzFX9xSiE1zaU/78Uc4aXk6WuUM7P8nc6I6MI0rQ3XCYCuAs833RM9UznncrCk93EKZtj8C7H5gQmPgU4K8fpxtaEePjc6QbkKaAp6xBhgGRYlqocJf4Pd2rfgei7nFFP7e/LeQHFVr/ABA+H+f2etNIbw39maIwktQFkI6bCV8PIIvSbkmon3RVkHqfEY/+y/AlUwTYJ7iuXy0f1qN7VVP0rusaYkSHao3h2jutrSDrNW9bC9e7SzvAnxrZMvNdt4NA== 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-SenderADCheck; bh=RkmKSNDSm3F9IllzI2+rNCzEcEd+ydI5be/a8TTJSg4=; b=fzUfDy7MhdeBVw4K+uU9h91V6Pbea6ju0/iAm1jWwxVW6pSjKGexlSJ1JipkKddI6Kf/1HxDe4f1LKHPG+p8zgx9M+M0cMV7w7qiw4XNflEQPLPAhu3csxDFzWEl+9/i9YOMdFzWbPcnhg2BLtL3uqEozZTU9MaTnDwUZw6SrhXBD+6No6IByNj12TKrY9a2hPgClNKX4/a2IG2uXmAC+YqyWRId97XjlRiDcDzVbF3D1brsnRVgww7eZ4042G814WtlyJA4vxZ7l9vpy2xAmdJYFpUrTSBHGMkWg1HMM7mv4Wetq0ssEk2V4EjPHaUW3srkywBhpK0GHfmV5FcyIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RkmKSNDSm3F9IllzI2+rNCzEcEd+ydI5be/a8TTJSg4=; b=I6AvMFKAGw960SgCzPEhHLS3skjX77XntnixSGKbvuBDjszjGcBfzyiuLwBjetJ1+EI0k6qjOWh3P3YuHdzOncVBVnLqe01n3Lj7YodoXRrXiJC4inDYLHuetEZbL7FhGqPxyhxqZjCDcdNmV3cFe2qROoSiaGTHlVEslGtsQ0g= Received: from SA2PR11MB5196.namprd11.prod.outlook.com (2603:10b6:806:119::18) by SN6PR11MB3182.namprd11.prod.outlook.com (2603:10b6:805:bf::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Tue, 16 Mar 2021 19:04:16 +0000 Received: from SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::e5ae:2c7e:c1b4:c0ae]) by SA2PR11MB5196.namprd11.prod.outlook.com ([fe80::e5ae:2c7e:c1b4:c0ae%7]) with mapi id 15.20.3933.032; Tue, 16 Mar 2021 19:04:16 +0000 From: "Carrillo, Erik G" To: Shijith Thotton CC: Pavan Nikhilesh , Jerin Jacob , "dev@dpdk.org" Thread-Topic: [PATCH v2 1/3] eventdev: introduce adapter flags for periodic mode Thread-Index: AQHXGPE0ju0EFNka0k2NoMr9XUrQIqqG/G0w Date: Tue, 16 Mar 2021 19:04:16 +0000 Message-ID: References: <20210308204543.2903723-1-sthotton@marvell.com> <3d202f9526dcb90ffbcd55fc4b5888989321b797.1615738894.git.sthotton@marvell.com> In-Reply-To: <3d202f9526dcb90ffbcd55fc4b5888989321b797.1615738894.git.sthotton@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [136.49.192.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9674953f-d79f-42e5-9146-08d8e8ae4bdd x-ms-traffictypediagnostic: SN6PR11MB3182: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PTOz0GDgM2SDUqxkoq7VjkBFyWrhRMer39dUMesR5/6zRDdpBERX0p3ZMRE9fyfGRLxbnoJYqS3W7bKK2IqENi56wOzbG+ATZY0o33SRq5pXz7EOcwELrStje2ik1ykOgTTiWEvQ+C2smJRBF5aNYYMmeuN/btjOGI0Ab6gUorkHrD5WxB0kViq860dAq3fr3bS46XOYjpUhX9GupULJRqspVDiEQGB+UP/2RBArbhFk9oQNQsCGDIC1L6hVC28Odh+p+rbhbDioRbzSlVEdMKtLHQ3y/ykGEsv0Y5k0q0oHoCD48EoBC2H11FO+1BhYyco0TSXMWMySms6MUR4HOVeS6dAJ07jqzwn9tEVQE5jDtsr2GKYo0HUTHLT3caGQOJeEcczgil8guOt350zqv5ZolTHKYIsxpVgMPP552Bse770r0Db/g4/dEkrkWCOsDBJyO3jdT6PFHn8acXIC9xJFKP1U6tOdf0SrF/a+SeE2e30QlXSQcE+Erhn6KRV+Jh5Hjh+nrKIsOepH6ZRzKoVhbv+Mpw5gzaQl8hEtSBBHrQPiulSZkikSJ2PbYRxf x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5196.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(376002)(396003)(39860400002)(346002)(71200400001)(186003)(26005)(33656002)(2906002)(52536014)(54906003)(316002)(83380400001)(5660300002)(7696005)(86362001)(64756008)(9686003)(8936002)(55016002)(478600001)(66446008)(53546011)(6916009)(76116006)(66476007)(66946007)(4326008)(66556008)(6506007)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Fa1Ak9GfV4FKGkBKCB7xwtwMUnymyIRxo5gUwKQT+ji3jpXyJBg3HhUV83I3?= =?us-ascii?Q?Bc5yg7LvegPRf74NwC/hzrgtWAJdZRBmWJrXT/1KsJm/MlV13wsKdLxr/yCf?= =?us-ascii?Q?e6zLKtY9K//h7TMVfp7F/iOZIQUb2aX8Qx7kF7ZoNH9BqBNphKNu+pZ2XZZl?= =?us-ascii?Q?uUNmfJNgtFpZ/S3BJyt/NwSJr0tdYTOn/L1pYC9V7C/L7o0hIeHLvYeAAWWe?= =?us-ascii?Q?H4NsJ74CYDafusOwfj5tSUCh+A9TmNGsTaURsjER/LOc0YISN2tw09C/UXAV?= =?us-ascii?Q?bC/zk+BnWSP0YZArHyhRBz5Q6PyF8GrLZTcxeuZq5MPbe9uBBT8ixLmgYP5P?= =?us-ascii?Q?E4Ka6fS5vrSBdqsx91vhrNscyJW0jownwUlGE9gPgeIudfxdZ74T9ihiMDl2?= =?us-ascii?Q?rVEtN8UMyJGA8ACfNjWs5ZHgJUOJPlqftiG9mO8NF8iUmCyUh0L7QtmDnhzg?= =?us-ascii?Q?e+qwVhsTyGEtHx9A01WAcQ4uVzhNrqDBGKmMn3VuUkiDC1KuNoxiuZOiA8OC?= =?us-ascii?Q?N3E+a3A4lYNzBa+WAFHxwVCnWBPwmk0/xMSE24rWBq10vTi6zvTAwoJm0WY5?= =?us-ascii?Q?KWZQHlBawK4PzPYAE9p3xitB7uGstwQy6veIxwPj+zOnYMnFtghHvIc1LLhX?= =?us-ascii?Q?QwgaSJ/BJeIeFOltiEVJ+6hcrEfkmOrPP88gjNhorR3FfI+KlqRUmMSPh3tQ?= =?us-ascii?Q?OVhlVUrS39nDK8qdOcXSFJatVKBUBdddGnJ46zNZ1qOd1737giXXi41Xoirl?= =?us-ascii?Q?HAmqTKcKXRLVeFR9kM3148nQGRkrVJZZrgaHiUT3wVjzH3YwtrNurF2Ip2IV?= =?us-ascii?Q?xHEnL5mVoCZRfJqhp2pbSU2U+BPWdpPbLmUU0mySMTaDXD5DpVzmlshVtUmh?= =?us-ascii?Q?KyeWGorF0FZACWkUiaJo5jLX5Vqtxu/A+KnEAx6Kv8/a8Y6PhiD+rfXz62Fy?= =?us-ascii?Q?lmTLvcJuVMxkSTjQ3YwvuTNF9p2QG4jDgc6W6YIphvZeSSnVNpzWxIw8OPli?= =?us-ascii?Q?xNB7aYBcSgEJVVhJ2LJOo/VM/BH03q0AU7Qy6CRtfZB/savD6MQ+3bV1sLuP?= =?us-ascii?Q?g5UlPFuFhLihgCqjLXulhwqIQElfdtiS1vYUwFMUY9RwF0/596TfPJFSiNGv?= =?us-ascii?Q?xRmeks+ixAwMHxdUBkQsfYsbdbFfONPLpDKp1Bgb0M7ci5pTfnk4s3Q60R4f?= =?us-ascii?Q?oRTM3oirbCkmsxxXt4T6AkKSvLL1eBl5p8jLLusPT1ujsUnDQKpBCsRkhfti?= =?us-ascii?Q?w56tn5Qc07cvrNUipROsStSXCmw/LSArosvM1OPa6o4aBMZNg8zw0kXMIV4n?= =?us-ascii?Q?5GWI6VYea/T3DUZQuPaT9Vby?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5196.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9674953f-d79f-42e5-9146-08d8e8ae4bdd X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2021 19:04:16.6017 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XaFjdMei0guC7TWhHz2FmKQcvCbMIrxLN/etQmsJ+1p1MbEhyDFS+wi2V/5EoZ68oC1F24/AEnLYkbBtbbdcIa7GHRw9+/4v841/3yPkykY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3182 X-OriginatorOrg: intel.com 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" 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 mo= de >=20 > A timer adapter in periodic mode can be used to arm periodic timers. > This patch adds flags used to advertise capability and configure timer ad= apter > in periodic mode. Capability flag should be set for adapters which suppor= t > periodic mode. >=20 > Below is a programming sequence on the usage: > /* check for periodic mode support by reading capability. */ > rte_event_timer_adapter_caps_get(...); >=20 > /* create adapter in periodic mode by setting periodic flag > (RTE_EVENT_TIMER_ADAPTER_F_PERIODIC) and resolution. */ > rte_event_timer_adapter_create_ext(...); >=20 > /* arm periodic timer of configured resolution */ > rte_event_timer_arm_burst(...); >=20 > /* timer event will be periodically generated at configured > resolution till cancel is called. */ > while (running) { rte_event_dequeue_burst(...); } >=20 > /* cancel periodic timer which stops generating events */ > rte_event_timer_cancel_burst(...); >=20 > 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(-) >=20 > 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 wil= l be > invoked if the adapter needs to create an event port, giving the applica= tion > the opportunity to control how it is done. >=20 > +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..." > +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``, ca= n be set for implementations that support periodic mode if desired." > +``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..." > 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()``: >=20 > 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. >=20 > 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 > */ >=20 > +#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 mo= de is the default. A timer will fire once or periodically until the timer = is cancelled based on the adapter mode." > + * > + * @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 t= he series regarding block comment syntax. Thanks, Erik