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 5360CA0545; Wed, 10 Aug 2022 21:55:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DC064068E; Wed, 10 Aug 2022 21:55:34 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D5FD94067C for ; Wed, 10 Aug 2022 21:55:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660161332; x=1691697332; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=VV2aFScuh3fnLaRKlDJA4/vK1wNKdg7pSVgAkctFQG8=; b=aZwxQu3a7oOd+ls5EXVkpZdDsS4lC/wE3ZWXk33sXpqfCVJRFASNV+xt haSME5Fx0gTaxFBqLsQSTBNX5Qawec5LmqmhQTlYb77am9Uaqig2gWrYG o2xLBEgBpVeyQSXxXZzha2Frres4p44mQZj+7lun8JWJkmbdYUsQJ9Qjc GDCcl3d6FlEF/R88LJbez4WI/7m+rw/MIKHipBaC9WlQxIuQqBL2baCAi KQSQkyBNOTgMTbjf0hm2wsDDbLKcsBzBjIfpvmP6MTObEpL5FxtzxphPg pnhFBnMrFhhOjqiK+/Ll8xPc3qqXkY8QyMldzPOyqXR8iefe1lZ1EYBdO w==; X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="274233448" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="274233448" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 12:55:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="633913669" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga008.jf.intel.com with ESMTP; 10 Aug 2022 12:55:30 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 10 Aug 2022 12:55:30 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 10 Aug 2022 12:55:30 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Wed, 10 Aug 2022 12:55:30 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.42) 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.2375.28; Wed, 10 Aug 2022 12:55:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=irf9aasSv/JN48Az2TmrIJ64Lmgl/WcsTymDL5uLLivbTCjTUIZIe3/3fBguzdVjcEcG+alI+d80R5RkHw9usXM23zhT6lf9GVMaPYnu46JPTcmpC6vhKyXIk5GdcZ1eVMIKoT84g47594BI4ynUcrj9VNR8w5aPRbsls16rlO0A28pWiHiJ3VIiKFjuBm44cjz8WZ/qdNupFPYvpIM/0iXn8L7i4YAeorLmqYLOAlf41Q1FCs/vQI83PmYDGN1sF5j5Z3qObINJ4zHblKKEchiRb+J5apIrwtBYLrjw9jz3hUt1McRJXigM2wxcHEI+ufW0hgVZ00ne6PEv3FdhCw== 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=wpFCbPCiSC5YxZl9HaYhA5Mf2DAIWhtpuUJfaewNp/Q=; b=E3kopCixuT/C6+2Prq1XfJU5J2zYh9Tgk0WBOshgtOu4EDZN0cQqNmuP6XtE5vc0bghDT2zOB/z4w9yBkKDh82mB6FxbOHPnrvlr6LGUVzln1CG7jSYmuRFNc/j3WwKaeAVmejrZZ7v+Q71tR+es57LYR9nH0m1idulzoGAB7L+oISYt4yGOZAeqfULULRcYYHTqigGxD5zobq9DxHONeYsYaTDWq72PAg2huBGadDWrEEgUPsb0C6TunJIxxF6nigDJ8QjnuedLRpEACnA7KA5yXk3VuGbuDtM4m4AUOSqh0GtkrV3Njvj5n6BYtKlexGBM4Jnm4ev1Cd8mGgU2yA== 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 IA1PR11MB6418.namprd11.prod.outlook.com (2603:10b6:208:3aa::18) by PH0PR11MB5595.namprd11.prod.outlook.com (2603:10b6:510:e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.15; Wed, 10 Aug 2022 19:55:28 +0000 Received: from IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::186b:95ac:d246:161e]) by IA1PR11MB6418.namprd11.prod.outlook.com ([fe80::186b:95ac:d246:161e%7]) with mapi id 15.20.5504.020; Wed, 10 Aug 2022 19:55:28 +0000 From: "Carrillo, Erik G" 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 Thread-Topic: [PATCH v2 1/4] eventdev/timer: add periodic event timer support Thread-Index: AQHYrIfdGiQHPz1CGEWoANndGdUqka2oi3sA Date: Wed, 10 Aug 2022 19:55:28 +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: <20220810070722.3110873-1-s.v.naga.harish.k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: e1529492-ad55-4d8b-ce60-08da7b0a4609 x-ms-traffictypediagnostic: PH0PR11MB5595:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aVFBq6qGaQ4WngTNyKfbphYFAd8BmbjNrl7nmeDiceJvNEQ0ZU9FaObL7/Ru5ffOi8XG7q3zxgblTE+eH+GITj/1KnDKtLJlnzmLZUQLCivP0vBCsA6s8an+SBh1ztgHcB1k6aVjjsgaSXbOHl1hoMw6vdpUZtSQYSPKkrfeulYxau9lcHbc1ldNH5fZ79iRAEC/b/slUuvBjB3Bcj+pCuPC+YExr2ix6HBUnNC1hI7l+YBSfkC3k8Cfq0lyiueNL6lour9j9q/1eOUu5EYSl7jA0e61QnipKEZN8OHCC2igQ4nt3p8wVd8qA52S2oIsWXhUwtteyu0cu3CXWpaS4Zq3VM6Wrx++TTi1HI/e9QBpes6hK9i58X38l5BzacqYjWVsiagSMalExRUCyC/pvgWq0fFsn6YHdfRsFPgNftOOUU2P3/or48NwLEEvNTJrULMEzonPSTjXsyqqy7DoM1+2UE6KKJHwZxYrxNK63XqjVbEkvCxQLkgozplrnpTHmvMFNKab7h5qRTC6skhXiAEQ1/6FyTPTVB+B/8huhG5PN12qmCy4/3vFLqz0Agdq1k/5wOuqMFJpBoaRb/r5TPNNYHFUJEtYhmxHiv/87deaQ2wDlKryynWkMrXJBuJ2Ncbc48EDIbXQTnU6nnwptSP+KWSDdyQis1xEy6EOi/oSTLWpjjhMgl0insPqGABlvKKMUw4s54fqKRIxlojSC2QYt8RPgSNtWzZYI8isJbVGDBhFyk6q+YprO1Az7uRWtU/CUf+egY40EyojTsfKdXUqzyjd07nCSruMugKWOdr2MvSyNBo552IYE7qOt0LU x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR11MB6418.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(376002)(396003)(136003)(39860400002)(366004)(346002)(82960400001)(38070700005)(2906002)(9686003)(83380400001)(7696005)(26005)(53546011)(55016003)(122000001)(38100700002)(41300700001)(6506007)(478600001)(33656002)(52536014)(186003)(8936002)(4326008)(64756008)(66446008)(71200400001)(66476007)(76116006)(66556008)(54906003)(110136005)(86362001)(8676002)(66946007)(316002)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?aiAp0qRtVzAuke38O+hgRDvHusyXid06CAA3TEuCf1l9FQjLTvi0NzC2Ctnt?= =?us-ascii?Q?4HKpsYha2PxSuQTJC3YLyZuA+kZ1cgBAKgbwD1QRQfEDmj6U6Uidk8quVTFe?= =?us-ascii?Q?1j7m4HG8OcSWI4KdSOA2O+YhAUYWUtnKPwLszuhuhch4M1LhlpToJ2FjptX8?= =?us-ascii?Q?lfXCYlHWOHmP7IRsCqic0r17CV3b+DLl6w1gGZdH5ZJqdlJMBNa0ZXGUMslP?= =?us-ascii?Q?b+t/00GSBtqf9yyjjJ65ZBqKAPEvJZ0eV4S19mH851m3D2apQQ3VyzAGx30T?= =?us-ascii?Q?499UMYPZNyH1dWvU62G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j7w?= =?us-ascii?Q?ZJkqEIs8vX0xk7Rp18jTuWp0LKBeE5Ua2+dfhrLM8bh0wJNIK44wm0WcIkne?= =?us-ascii?Q?CMh7xF44N5qCEb4aDt4GUwvE/y/8LvZ9EEQN4gFZFVeeZKAIB2YLGFQ73HBp?= =?us-ascii?Q?XmSvpRel0TbNfdTEgsrwdTYp9xv17vGVoltIEy0LA927uPF4cdTYZ0zoYSHI?= =?us-ascii?Q?cWudniPpRR0s1Ab/sGIgKRgnY2pXRV999tJqZENuHrgBsWcvjVXc84c7R0Yt?= =?us-ascii?Q?zuxi0rZe55vObIom3wB8g+1DVFA0nkCS8/U/AenNOkrGtKh6NXMd+4iye8FP?= =?us-ascii?Q?Fd/mNlCD/5wRrroD0j9fzoEBelBWZ94a+TcXJ5EPOY/fMe4TkawMU/mfnogb?= =?us-ascii?Q?Wj+A2MfzimFuGEjjYQ9JK254AxDF/I5dTBLus/r+OXzmMjxFYt0cfarFyMKn?= =?us-ascii?Q?Gg=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: IA1PR11MB6418.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1529492-ad55-4d8b-ce60-08da7b0a4609 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2022 19:55:28.0815 (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: FJ0Nqnymhoo+u453GwIHiOHa457fy874SbaQz6JgCz5xPhzk/5fkAOy4CeLY1Dti4xHox15aNaDKMQ6+sM1+41CeyLO5yO11XzJtaXLZI20= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5595 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 Harish, > -----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 >=20 > This patch adds support to configure and use periodic event timers in > software timer adapter. >=20 > 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. >=20 > 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(-) >=20 > 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 >=20 > +static inline enum rte_timer_type > +get_event_timer_type(const struct rte_event_timer_adapter *adapter) { Let's call this function "get_timer_type" since it is selecting a type for = an rte_timer. > + 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 */ >=20 > /* 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; IMO, this hunk would read better as: 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; } } > @@ -348,10 +357,11 @@ rte_event_timer_adapter_lookup(uint16_t > adapter_id) > dev =3D &rte_eventdevs[adapter->data->event_dev_id]; >=20 > /* 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; Same comment as above for this hunk...=20 Thanks, Erik