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 E3DE7A0548; Thu, 11 Aug 2022 17:44:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF924427F2; Thu, 11 Aug 2022 17:44:12 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id EAF34410FC for ; Thu, 11 Aug 2022 17:44:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660232651; x=1691768651; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=EHLk2q/19V8OD7KP5QMfqjBFjt38N0XxF1SyIDwb0Y4=; b=PQfnLeFGc4OP0f5FWrG5MRLuMZ30oXtiVXaG4BGdznw8Xv2ecZKiAMPb izlR5Ctv7CSBMR4oD5eRtNmz78RF5I7gMUqgKdxzOt9Qaynso6g4xu6w1 Hmo/gG5IxalRQP2JsU2VMMG/EEnOxXEmAgWozy3OAVEu+1+wxhMms3ClW w0qANrk6dHrr97KFpp+t+owIsQmfC7N8Q2g1tYhzmprH92w59+Ow6VxJP Dw018BuhdX0N+kfhQ7svbZ9ZgtJxZ03ZXQ4wk+lCIf6lWIvOgfhRr6kAF yUkQObXBcgg3NNROr7BcOgqO+02iihSN/mn9lTmG/Ghxw9kCIptFH8tWC w==; X-IronPort-AV: E=McAfee;i="6400,9594,10436"; a="291383252" X-IronPort-AV: E=Sophos;i="5.93,230,1654585200"; d="scan'208";a="291383252" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2022 08:43:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,230,1654585200"; d="scan'208";a="581719476" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga006.jf.intel.com with ESMTP; 11 Aug 2022 08:43:58 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 11 Aug 2022 08:43:57 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 11 Aug 2022 08:43:57 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.48) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Thu, 11 Aug 2022 08:43:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=em1YTRrFZ8+8RJ6bP2M1W9bGnCdvGJVGtyI4JO47zoVI73eKexyYoxmTrspfOMQpTdfKOcnO0Q40Kjd6Z0RHzlDKQ8SILr5VjRdstKWQ2mP7cMqViytgP4hXNVSzr4zC0rt9BkdAtaBUaPKFlHlG0GmczmrSiQakf7DgByCKbbeur58ECzYWlwLM/xNcBYCDPMablS4vqBAI68IBvykR0DLHEhMmgd0ht0SAs43qdlWwbvy+RUGlDEWIvNnISwVPwOBuVhVwAEK/FiaPaCqhNYx4sOMCGZTIQO0joHmY/jVoSFuAQ9iTd2a71T9vnmzmTphmm4f6IHr7Y1749ZEK9w== 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=3XQ7swTqDrmy8u4urXd5fP8/7M81FF1cSSN8cXT6QRU=; b=U+a/7oe85OWEB2aKNFwNeYf0+ofpidYJgjO8hOGoAXhzcFhp8g+damJ9MCwxkrMdCjRVQTxLbNv5tE3FHEKWmKHl3uWsOzt3iRv8PpuuXA29p1iqwjTqf69Nn2AzyZbh04rHpT7DE2IFulRU1xEwW1Wg59xzYYVHaEZg/NElT1YiDXZKZ+s3IXTiAB9yT9hMrsoy6TVjBZMvA2tEXTX6l8EijKSxr7cPx09CpCnNotwrppwJpSTwYCrS3bcW3wgnZDcDJar9aLuAV50vliiJTb2/T5PIRhLIob5jFQJfHxztXZpI6dFud9SDjqo/aPlKTVmFWk8wL9+Cg8UINFp0zw== 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 Received: from DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by SJ0PR11MB4989.namprd11.prod.outlook.com (2603:10b6:a03:2d9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.18; Thu, 11 Aug 2022 15:43:55 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::128:9f09:dd7:d6b9]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::128:9f09:dd7:d6b9%6]) with mapi id 15.20.5504.020; Thu, 11 Aug 2022 15:43:55 +0000 From: "Naga Harish K, S V" To: "Carrillo, Erik G" , "jerinj@marvell.com" CC: "pbhagavatula@marvell.com" , "sthotton@marvell.com" , "dev@dpdk.org" Subject: RE: [PATCH v2 1/4] eventdev/timer: add periodic event timer support Thread-Topic: [PATCH v2 1/4] eventdev/timer: add periodic event timer support Thread-Index: AQHYrIfdGiQHPz1CGEWoANndGdUqka2oi3sAgAFNdBA= Date: Thu, 11 Aug 2022 15:43:55 +0000 Message-ID: References: <20220803162542.3145559-1-s.v.naga.harish.k@intel.com> <20220810070722.3110873-1-s.v.naga.harish.k@intel.com> In-Reply-To: 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.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8f9246e1-217c-4de4-ea6c-08da7bb04c62 x-ms-traffictypediagnostic: SJ0PR11MB4989:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VdND67gDOn1aiqoiG3CdyJNCEBz6cfbiUpoiX/vKCQc1p3h/PhUqss21hX9fg6m8ZvU/4jkRs3Cdz2wBdial8QK/Yo+4zsbKBvKoxCQaQOagwmzMlvTxB1keaqeFiw2uD4Y8o73DswL8SmthkEdW3rMLTNmQ8UTbTDAjXCCw+RObANYlpd4H/xXCRt7ZtrzusUZdr4PkaxgHQr2OERCODLIib3wzhat8LqcF4kXlPW1nRZKXjiR0C6eMsAZxPfC1rB/gPxObznZr6PFvX792A2PCqEQqdeX9wXpta2v5uo0PtcZtxat4o6MrhA9v5uwSxZ17giNqpAZA1HqZK8VwvZZxKQ+hz25T5UQvKy5rofInlDes5VpmPkeJIWn3gQAHgHMfBCrZ2ej4T3+vc+s8FJ8VUhccvixNrxkUWDMGamw7dzE9VPZfJikp6o6t51iX0yZkyVVvyXOxoZzSymsyhFgKraGF+hZ9GY6vKQ7nlS2NZwj3ugqdQTz0m7in3XRZh/dsuu2X77icj4L+btpo1EybCsuwuRrILB3bBum00TWzf51xRGSb3rx4gJcYpVm2HEDUW2DX9gU+ffNruDpm6wMyP7w3QXRSGVIpPnfqwzRD4LotHLpuEED7ko5RmW45buQ+LrT1pzdJvnAFT93cN/+IO4M+P3cy1rhWza5RYLRnveWsB526NE/XIWkIL6QX78Nv1U2CkGXRjP8RAYFMYPEMwn1qrF6ry1fLj0FpUSc3UTaO/PZnbX+30/yOwDrJcsigcaebbjaICfyWwgNz7XJoldDZNIJsCWSCtFvsj5CulGrNg/pnhNkTgcYPHirZ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(346002)(136003)(396003)(39860400002)(366004)(376002)(83380400001)(2906002)(26005)(9686003)(76116006)(66446008)(66556008)(66476007)(38100700002)(66946007)(6506007)(186003)(7696005)(33656002)(53546011)(64756008)(5660300002)(86362001)(478600001)(41300700001)(52536014)(8936002)(122000001)(4326008)(71200400001)(8676002)(316002)(110136005)(54906003)(55016003)(82960400001)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MvL1JO5LdhfGRuKzYVOLJg97VBP3qCpbV1OmCf35T3eNB1Ox0Rc7LOog4i+D?= =?us-ascii?Q?sQto8AKm/mMmqBrdXyEsu8oaJHoJnVBo8+kjvxzDR6xc9OXGqmq5jMUcjjho?= =?us-ascii?Q?F8+iLglhVg+Er5BlMfSp5Use+irG2GWopUwsW+jONFWGYqgTuA38YBTkouDp?= =?us-ascii?Q?V4CE3pcyuOx8Cr6jSa8VDW3Rjf7uvZE+cSmjF2txRFK18ToTCAQMcFZdQttg?= =?us-ascii?Q?96QGbxNmX3vRrDUtfe9N5j5Bq7DQO1wRSl3PQwVAxSxsd8vrLkZMPid0zAiZ?= =?us-ascii?Q?ltDifIWllCQf9SPxTIYr3kTujCyh06lLje1IPgYyGpQQZl7psoFMAhV0hT60?= =?us-ascii?Q?tIRanETsjQSpf0YmjUWr77xrca2VSz4ECMmYy5Qja6EOCc0n6mTiiA6sERif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p91Zh90TGgBN/B0t?= =?us-ascii?Q?8dKWRi6BcgAS8e1IHTzUpEakBVmY5X4SgcBp9NnICo5VVhnsywqYajvU9mya?= =?us-ascii?Q?cA4H9W3rqrwiwMH7PgZXPNh9Xp9q8DIO+eQOeDOC7CrK/smTQR5z1Yx/7TSm?= =?us-ascii?Q?6Tmv/HpM2JEfNOck0cMmuuRnK7DJpzYPjqBuCL95sBmgyjUwGySPc2rCEf6b?= =?us-ascii?Q?lq2pb7s+9CJq4YoIBodXicS67BtWfl3BgKH3DXM5QHsEflP8dpg9R9TdOMeD?= =?us-ascii?Q?KDBeRNFK4j2PttYMyg/OCKYRf0kSjt/Kun4EF1EI/X0XzoMN6V8tQBMa9ahC?= =?us-ascii?Q?LA=3D=3D?= 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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f9246e1-217c-4de4-ea6c-08da7bb04c62 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2022 15:43:55.1889 (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: pzcePBQw74DWi3KRZceJtsDdeDxHb/eo2Y0SsAX4KgUMMCQfV/L+GB+WtQxWdgpc8+ybNLYjzGn2Dm8yxafNrK3a0ttPNBXc6+HNR/4WxQg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4989 X-OriginatorOrg: intel.com 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 Hi Gabe, > -----Original Message----- > From: Carrillo, Erik G > Sent: Thursday, August 11, 2022 1:25 AM > To: Naga Harish K, S V ; jerinj@marvell.com > Cc: pbhagavatula@marvell.com; sthotton@marvell.com; dev@dpdk.org > Subject: RE: [PATCH v2 1/4] eventdev/timer: add periodic event timer > support >=20 > Hi Harish, >=20 > > -----Original Message----- > > From: Naga Harish K, S V > > Sent: Wednesday, August 10, 2022 2:07 AM > > To: Carrillo, Erik G ; jerinj@marvell.com > > Cc: pbhagavatula@marvell.com; sthotton@marvell.com; dev@dpdk.org > > Subject: [PATCH v2 1/4] eventdev/timer: add periodic event timer > > support > > > > This patch adds support to configure and use periodic event timers in > > software timer adapter. > > > > The structure ``rte_event_timer_adapter_stats`` is extended by adding > > a new field, ``evtim_drop_count``. This stat represents the number of > > times an event_timer expiry event is dropped by the event timer adapter= . > > > > Signed-off-by: Naga Harish K S V > > --- > > lib/eventdev/rte_event_timer_adapter.c | 86 ++++++++++++++++++----- > -- > > - lib/eventdev/rte_event_timer_adapter.h | 2 + > > lib/eventdev/rte_eventdev.c | 6 +- > > 3 files changed, 67 insertions(+), 27 deletions(-) > > > > diff --git a/lib/eventdev/rte_event_timer_adapter.c > > b/lib/eventdev/rte_event_timer_adapter.c > > index e0d978d641..0de88dfc0f 100644 > > --- a/lib/eventdev/rte_event_timer_adapter.c > > +++ b/lib/eventdev/rte_event_timer_adapter.c > > @@ -53,6 +53,14 @@ static const struct event_timer_adapter_ops > > swtim_ops; #define EVTIM_SVC_LOG_DBG(...) (void)0 #endif > > > > +static inline enum rte_timer_type > > +get_event_timer_type(const struct rte_event_timer_adapter *adapter) { >=20 > Let's call this function "get_timer_type" since it is selecting a type fo= r an > rte_timer. >=20 Taken in v3 version of the patch > > + return (adapter->data->conf.flags & > > + RTE_EVENT_TIMER_ADAPTER_F_PERIODIC) ? > > + PERIODICAL : SINGLE; > > +} > > + > > static int > > default_port_conf_cb(uint16_t id, uint8_t event_dev_id, uint8_t > > *event_port_id, > > void *conf_arg) > > @@ -195,10 +203,11 @@ rte_event_timer_adapter_create_ext( > > adapter->data->conf =3D *conf; /* copy conf structure */ > > > > /* Query eventdev PMD for timer adapter capabilities and ops */ > > - ret =3D dev->dev_ops->timer_adapter_caps_get(dev, > > + ret =3D dev->dev_ops->timer_adapter_caps_get ? > > + dev->dev_ops- > > >timer_adapter_caps_get(dev, > > adapter->data->conf.flags, > > &adapter->data->caps, > > - &adapter->ops); > > + &adapter->ops) : 0; > > if (ret < 0) { > > rte_errno =3D -ret; > > goto free_memzone; >=20 > IMO, this hunk would read better as: >=20 > if (dev->dev_ops->timer_adapter_caps_get) { > ret =3D dev->dev_ops->timer_adapter_caps_get(dev, > adapter->data->conf.flags, &adapter->data= ->caps, > &adapter->ops); > if (ret < 0) { > rte_errno =3D -ret; > goto free_memzone; > } > } >=20 Taken in v3 version of the patch > > @@ -348,10 +357,11 @@ rte_event_timer_adapter_lookup(uint16_t > > adapter_id) > > dev =3D &rte_eventdevs[adapter->data->event_dev_id]; > > > > /* Query eventdev PMD for timer adapter capabilities and ops */ > > - ret =3D dev->dev_ops->timer_adapter_caps_get(dev, > > + ret =3D dev->dev_ops->timer_adapter_caps_get ? > > + dev->dev_ops->timer_adapter_caps_get(dev, > > adapter->data->conf.flags, > > &adapter->data->caps, > > - &adapter->ops); > > + &adapter->ops) : 0; > > if (ret < 0) { > > rte_errno =3D EINVAL; > > return NULL; >=20 > Same comment as above for this hunk... >=20 > Thanks, > Erik