From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 16FF91AEF0 for ; Thu, 30 Nov 2017 21:59:20 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Nov 2017 12:59:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,343,1508828400"; d="scan'208";a="154828071" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 30 Nov 2017 12:59:19 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Nov 2017 12:59:19 -0800 Received: from fmsmsx115.amr.corp.intel.com ([169.254.4.116]) by fmsmsx117.amr.corp.intel.com ([169.254.3.51]) with mapi id 14.03.0319.002; Thu, 30 Nov 2017 12:59:19 -0800 From: "Carrillo, Erik G" To: Pavan Nikhilesh Bhagavatula CC: "dev@dpdk.org" Thread-Topic: [RFC PATCH v4 2/4] eventtimer: add common code Thread-Index: AQHTaNG+8P8crW5AH0KrpUQdf9hI2aMtZzTA Date: Thu, 30 Nov 2017 20:59:19 +0000 Message-ID: References: <1511217333-142455-1-git-send-email-erik.g.carrillo@intel.com> <1511890808-6072-1-git-send-email-erik.g.carrillo@intel.com> <1511890808-6072-3-git-send-email-erik.g.carrillo@intel.com> <20171129051924.o2q7z6l7zeewd7kf@Pavan-LT> In-Reply-To: <20171129051924.o2q7z6l7zeewd7kf@Pavan-LT> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmNhOWEzZjgtYmI4MC00YTQ2LTkyMGUtZDlmYTU4NDBmYTYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIzRVc0YTF6Skh2V0NxUklzME9oTVJRbGxyVnZZU1pTYXZWa01GZ25uNDlsYTh6YjMrbTJ3YzdoVTVGNEtSblozIn0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH v4 2/4] eventtimer: add common code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2017 20:59:21 -0000 Hi Pavan, Thanks for the review; I'm working on addressing the comments and have the= following question (inline): <... snipped ...> > > + adapter->data->mz =3D mz; > > + adapter->data->event_dev_id =3D conf->event_dev_id; > > + adapter->data->id =3D adapter_id; > > + adapter->data->socket_id =3D conf->socket_id; > > + 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, > > + &adapter->data->caps, > > + &adapter->ops); >=20 > The underlying driver needs info about the adapter flags i.e. > RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES and > RTE_EVENT_TIMER_ADAPTER_F_SP_PUT so we need to pass those too conf- > >flags. By "underlying driver", are you referring to the eventdev PMD, or the event= timer adapter "driver" (i.e., the set of ops functions)? =20 If the latter, the adapter "driver" will have a chance to inspect the flags= when adapter->ops->init() is called below, since it can look at the flags = through the adapter arg. If the former, will the eventdev PMD consider the flags when deciding wheth= er or not to provide an ops definition in the timer_adapter_caps_get() call= ? >=20 > > + if (ret < 0) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } > > + > > + if (!(adapter->data->caps & > > + RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) { > > + FUNC_PTR_OR_NULL_RET_WITH_ERRNO(conf_cb, -EINVAL); > > + ret =3D conf_cb(adapter->data->id, adapter->data- > >event_dev_id, > > + &adapter->data->event_port_id, conf_arg); > > + if (ret < 0) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } > > + } > > + > > + /* Allow driver to do some setup */ > > + FUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, - > ENOTSUP); > > + ret =3D adapter->ops->init(adapter); > > + if (ret < 0) { > > + rte_errno =3D -EINVAL; > > + return NULL; > > + } > > + > > + /* Set fast-path function pointers */ > > + adapter->arm_burst =3D adapter->ops->arm_burst; > > + adapter->arm_tmo_tick_burst =3D adapter->ops- > >arm_tmo_tick_burst; > > + adapter->cancel_burst =3D adapter->ops->cancel_burst; > > + > > + adapter->allocated =3D 1; > > + > > + return adapter; > > +} <... snipped ...>