From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0089.outbound.protection.outlook.com [104.47.37.89]) by dpdk.org (Postfix) with ESMTP id 4461A25E5 for ; Fri, 1 Dec 2017 06:13:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B6QJikK4snNXzL5GpDB6h4tZhqR3F6RUA9CjB4dS3TE=; b=LE5RNzJ56QIEvNJ2l5nB7Eou8nUZvNhT/iQoiKXaYdsGjq4AOuqXnwwseeQwUb8Ld8oJ9YL7bDEuCwOZ3TBNx0K51gR5KCM3FNnkUOirXykssvUr4puCBbSg9IoAX7QB8BqZ+u/ZC3xYoJTzcU1LZzCqTnIo3ZGS4qGJZL9GtIM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (103.16.71.47) by DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Fri, 1 Dec 2017 05:13:34 +0000 Date: Fri, 1 Dec 2017 10:43:15 +0530 From: Pavan Nikhilesh Bhagavatula To: "Carrillo, Erik G" Cc: dev@dpdk.org Message-ID: <20171201051314.osskzpohzike7r3h@Pavan-LT> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: SG2PR0401CA0001.apcprd04.prod.outlook.com (10.170.128.139) To DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 53bc3cca-627a-4121-1404-08d5387a464e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286); SRVR:DM5PR07MB3468; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 3:wJIl2GBqPJYccpMfyej8YWLRToaaK95Y7SORVmg54DJq2vv2kdHYag3UfM6yQ/95Eg/riojajNHyNVjwFX9JLPxcmWE/j3bAZLXjCDozAW4GcqVRKsbm9PTprMRZKg4mXbLepL4ieUXI26pe8knne3Ho7U4nk4aEVFen08ZvozhmrLL8h2pzqH4PNF3wQqCqTk8fAZ/gcqr4vIw8upwhM7V2fjU2N3BK7AhHIXDUMcLywdBmIHNWr68iPghR7chV; 25:6oVTDJBtQySrJb1d8ACDjk8SWxuUGn5JaHzbTA9XHNiw4mpyvy29xqSATfbSJq2OKoBjkseVUCkHo7/1nzwVkr2MVKqa3zbf106qCkBUrykLV5vdIuV7apxLk3fG7gCNbKAEP8bhWdLK1jUP3Gs/ccjR67fJUpPS41Tae2aPtNxmxq1cs++/hk0B29vKonbhfnvuGgJc2U9GS5uoQMEyeUV4SLKGMPT4Fq6X3Q+s99eQCzynUXvvzFkXCZB6eHKjJhb0DUIjF7+bAfUPW82/AUM3neGDtnakoMFk03XAKyjLBPG8WhJAiOVdhU+faGgNCFVIh8N0ztejy7DqTgGnVw==; 31:toQypwNYMAzioMxBfSkhnjptgyq4nbVef9619t6U3eKO8c13VQ72MpkMu4J7ejZrDYaUOrWV3Pf/yGf0ISytGTtam5YOYzN3wxiETYg8CPXVRXROilHM8YWkd/Pbq5oVXEEg4PPSlCLyrBt602iqi+o3YRt1l5E2gdDXpHaUlC1fzTJXQ7yGpmhlCMyb5jwvua2BmTxNGve9uz0F7vr2RjpGw0su4Y+EWWtODIqrewg= X-MS-TrafficTypeDiagnostic: DM5PR07MB3468: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 20:Lkn++glSINwwaD9JE+ih4oNYe4hADBnyFJQIvBzmi0QLeft7BIZ7AxpR6DlmdMeXgOsNxjmLol5Xgxl1c525fTXPxO5zqjXeylNEAzGoM0B6G9mYwrMm1OCgImNYJOyauAvBn5t2j1zGsqIfzYTPVQmrJa8x0lWosHmA3h3wcluPw0Vz/+iP9nmQaeqlKzVbum3KRSULmXg4BtFV05VhEP07uabizMl9vkZwYt1J+lJ8qNz2HnKC5CbOoXH2QnKN+tfugJh4F4iH++2bymo6qE4O5OT73SJUgMbH9OmqFWmhUsit/v8fdDMfsg43fxdlFI2qgXsKh8KzoobBoRyuq6ve+/ZuA765TU73FZkheaco9g6ZmrjpZK7Yv79xmf7Oda5+Yc58SzAoIH5/mornvxuFcFhApy0JpgEr3UoGTqUk/FaMOgfzD+IMJlYIqQLNiWE9LCsqbGXWYdc+nSuN9itIu/2a2KSEj4QePhW7dK83F5xSW6npKmGiZQOJE5R9lmjBVy+86RSw1XmbB41pL9v0ggiKpsjspF+am3t83sJ1UwBs8rornmTZe9G+mXs4ahmKMFt7p1TnEBZlLsb6eRtaozU6WYXLg8HBe1/0DzM=; 4:OYHrcKAA4A33hzi/gJfJRg8QaHnKWa9ho3ORpRRGGLH3kyadOTgPj78lpCwpl35xgUzKTWxwV8m2LCImYaJ8nfuGB8P0RjjPqwwWrMyOASr0koK/eurG15zbLvrTcwW5miEWjU6ftRXNL0MhpqLTZ3ESDKBW4z8SHi8DfKQCJAqV4dPn/De97aUOR4Xxv2oLdsE8QfNI3di24B7vxfPTzb2q6zhlwH7CUKO5ApuYiN+WHqtI9zjBBKjgaNn+UgZpdVXFYNzWSIG3R6W5W4HJrw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(3002001)(93006095)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011); SRVR:DM5PR07MB3468; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3468; X-Forefront-PRVS: 05087F0C24 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(366004)(376002)(346002)(199003)(24454002)(51914003)(189002)(25786009)(68736007)(6666003)(5660300001)(229853002)(42882006)(8936002)(55016002)(3846002)(2950100002)(2906002)(105586002)(9686003)(1076002)(106356001)(23726003)(6116002)(33646002)(101416001)(6246003)(83506002)(47776003)(81156014)(7736002)(50466002)(81166006)(66066001)(4326008)(189998001)(53936002)(8676002)(33716001)(72206003)(16586007)(97736004)(93886005)(6916009)(6496006)(16526018)(305945005)(478600001)(58126008)(316002)(54356011)(52116002)(76176011)(107986001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3468; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3468; 23:Meg9lf/pnILSJbik8KBU5fmzC2sJZgjj1m0sO7Yu4?= =?us-ascii?Q?8KvjpzXtmd8t5pI16hjci2F3Gd6jY/WmwRQnwqW0cbE0+Abx5S/OgQmUbuCR?= =?us-ascii?Q?tj3aYrcbG+YbwdkvXum1WFXh1Qu5BXPLzUPzLojf1HnTXzZnZCzsHp7OzEUv?= =?us-ascii?Q?5ev/J94yX48znQyM5I9EE6MDuA+r5E2QvZA613IsxxWPERTMkWfE5S2VbsXi?= =?us-ascii?Q?tBhuPBujjsjEKlDndouybtYTsWE/Bejgi+cjyDDVqjtfmZRjsZM8rjl0vHsU?= =?us-ascii?Q?ZaJ2nZgl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V3tXiOVcE3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2017 05:13:34.8074 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 53bc3cca-627a-4121-1404-08d5387a464e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3468 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: Fri, 01 Dec 2017 05:13:38 -0000 On Thu, Nov 30, 2017 at 08:59:19PM +0000, Carrillo, Erik G wrote: > Hi Pavan, > > Thanks for the review; I'm working on addressing the comments and have the following question (inline): > > <... snipped ...> > > > > + adapter->data->mz = mz; > > > + adapter->data->event_dev_id = conf->event_dev_id; > > > + adapter->data->id = adapter_id; > > > + adapter->data->socket_id = conf->socket_id; > > > + adapter->data->conf = *conf; /* copy conf structure */ > > > + > > > + /* Query eventdev PMD for timer adapter capabilities and ops */ > > > + ret = dev->dev_ops->timer_adapter_caps_get(dev, > > > + &adapter->data->caps, > > > + &adapter->ops); > > > > 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)? > > 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. > I was refering to the timer driver, the presence of flag RTE_EVENT_TIMER_ADAPTER_F_SP_PUT would suggest the driver to use a multi thread unsafe arm/cancel data path API and it would set a different function pointers to adapter->arm_burst etc. I dont think in the current scheme this is possible. Currently, if we see mempool it inspects flags before setting ops. Hope this clears things up. -Pavan > If the former, will the eventdev PMD consider the flags when deciding whether or not to provide an ops definition in the timer_adapter_caps_get() call? > > > > > > + if (ret < 0) { > > > + rte_errno = -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 = conf_cb(adapter->data->id, adapter->data- > > >event_dev_id, > > > + &adapter->data->event_port_id, conf_arg); > > > + if (ret < 0) { > > > + rte_errno = -EINVAL; > > > + return NULL; > > > + } > > > + } > > > + > > > + /* Allow driver to do some setup */ > > > + FUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, - > > ENOTSUP); > > > + ret = adapter->ops->init(adapter); > > > + if (ret < 0) { > > > + rte_errno = -EINVAL; > > > + return NULL; > > > + } > > > + > > > + /* Set fast-path function pointers */ > > > + adapter->arm_burst = adapter->ops->arm_burst; > > > + adapter->arm_tmo_tick_burst = adapter->ops- > > >arm_tmo_tick_burst; > > > + adapter->cancel_burst = adapter->ops->cancel_burst; > > > + > > > + adapter->allocated = 1; > > > + > > > + return adapter; > > > +} > > <... snipped ...>