From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0059.outbound.protection.outlook.com [104.47.38.59]) by dpdk.org (Postfix) with ESMTP id A9E0514E8 for ; Thu, 10 Aug 2017 18:53:47 +0200 (CEST) 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=rbUGBRfPyCzu4k4B/i6Ec+LaGXTmV4fnfNpucy/UIqE=; b=cIXyJehDMdSUUqcg45+7NrWhy5W6/HktI8piHDKYDGJRRmTD0GKdS2KQA+xTlFg81nNnrcXM+4LcV943GP/fM7oozrMdWmP0xr5dHYtTQqE2/Vok9zAwOtvlXYYbgzA2Dsol6+OPi/4AoI2sQkWgaDlEp7eTtJ2tRst2/tqU+og= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.200.247.99) by CY1PR07MB2521.namprd07.prod.outlook.com (10.167.16.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Thu, 10 Aug 2017 16:53:40 +0000 Date: Thu, 10 Aug 2017 22:23:21 +0530 From: Jerin Jacob To: "Eads, Gage" Cc: "Rao, Nikhil" , "dev@dpdk.org" , "thomas@monjalon.net" , "Richardson, Bruce" , "Van Haaren, Harry" , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "Vangati, Narender" , "Gujjar, Abhinandan S" Message-ID: <20170810165319.GA6051@jerin> References: <20170713184445.GA3659@jerin> <123ed8d6-4fd9-8bee-d86e-d270a092169e@intel.com> <20170729151252.GA25166@jerin> <7b9ca757-f428-3675-b997-794ec6e96f2a@intel.com> <20170801164242.GA6467@jerin> <9184057F7FC11744A2107296B6B8EB1E01F00701@FMSMSX108.amr.corp.intel.com> <20170803062315.GA14704@jerin> <9184057F7FC11744A2107296B6B8EB1E01F030FC@FMSMSX108.amr.corp.intel.com> <20170809161946.GA6650@jerin> <9184057F7FC11744A2107296B6B8EB1E01F0EEF4@FMSMSX108.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E01F0EEF4@FMSMSX108.amr.corp.intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [106.200.247.99] X-ClientProxiedBy: BM1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (10.174.208.14) To CY1PR07MB2521.namprd07.prod.outlook.com (10.167.16.12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca6f5888-67c5-4100-5d12-08d4e0105d31 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 3:cmK8SR/urSNrdmRzdzFkhwj1BWc5L564AyDyVnNaujxflAQqhk1StghV7cTW1YFvPjixtQN43iLI1//zpRuhdJo4QpbJcrd6z/z5kxXONIuUctLFT7dSAd7w5XGTDl9m6iYDWjlyn0m4F2vC3OJpWWzRoJC5EPqzp3h5M9uGa7+/hoqIwJMks0ACe/TKovJTCch6bmZphQznKjaVGxZ9JoFhY16mXROUdJjhoD5E/gbXaqlm1itHA5S0YrUoCEbv; 25:bTs8VMNMaVthzTJZbiJOPNizGhYidwcsajNMRF6ArYSY//9jUNcqLEeYCm0LxU1c52IBb2OzsgD7wkeGSceCSBXRD3RX7bLLlG3vL65Lw4SKcYiboWvY0hhv+f1AT6FNzYzDW9MRw0EUdbcwzFz8rQWq/MSEFWCUOCSG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jKLGkTQE8o0nAze5bNO4gS6HY= X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(185117386973197)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR07MB2521; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 4:0u3VxynLWFQ8kVQBKM96RDyHrgC3t4obaEUU/SwTFXy6Rr0QoyInCshcPID/cGe+xzaeA5L1hA5FiKYwOaehpyRH27g56dNX+kLIwd48bnvaf17A9f2X7mQu5ofNtP9XXwybgi9+hOmp1VseSDJ3wUW/e4TF2o1KSJ8BRe8xnRJVWDynNHq4rNqdAkIJMowR1I56QClPNfedm7k+3AQvmo0OwO6kGBzQToydVbEofYIG2i9gLswaJfWArwjfeNPru4D2H0iOe31BGSo4EdYJGXqXhcyos+gLOnL1RNZdbgUotlTOJ1fdJH1idng8q3afRU0X65I+CBZ4FHTlTX8JQ8q8c7TFL2fWmF9MsDUVJLl4+QTWhL+POwyJmgesqcXS X-Forefront-PRVS: 03950F25EC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(189002)(199003)(13464003)(52314003)(101416001)(6246003)(8676002)(76176999)(8656003)(81156014)(33656002)(105586002)(50986999)(7736002)(110136004)(38730400002)(305945005)(7350300001)(54356999)(47776003)(97736004)(66066001)(53936002)(106356001)(81166006)(55016002)(9686003)(54906002)(7416002)(6496005)(2906002)(5660300001)(50466002)(42186005)(33716001)(4326008)(6916009)(478600001)(93886004)(6666003)(42882006)(23726003)(229853002)(5009440100003)(2950100002)(68736007)(6116002)(4001350100001)(189998001)(25786009)(3846002)(72206003)(83506001)(1076002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2521; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CY1PR07MB2521; 23:f/OtTk1gce0qT+4jPEwrFjepHEMEJ64i9VgxuMFFp?= =?us-ascii?Q?aZKaQPpoHD9vuQXeNyOp5b3HOul2vc0Z5DNrKrW/786MDVwstkwe9gSIinRK?= =?us-ascii?Q?ZX1SDzVFcGgb7JCHKdGKD3v2O3D12MU3YgGUjXqBH3azCXSb1/ZPDuJy9XIU?= =?us-ascii?Q?IOIDxr1L+0FDsb25IjHi+QlyiL0MfNmfQr5VMm2gIF7hZuyK5WChPhlZG4jz?= =?us-ascii?Q?cuzi5r+M77E9thanNbLYSQLJ7Ma/7H1eJ9gBxyp7Tslt6GgBpTkGwyT+aTTA?= =?us-ascii?Q?hLSFoo7UkGVt/U6MjU4DNRBzAUL5XNwD0w++g8GyOMwhnlU+UmVDDt5PXruC?= =?us-ascii?Q?yWmDxeGHrjyi+ud8mkPyxLwJXAhGn0s1x0WbQXF5dJZi589GM3Zf0qhMps3F?= =?us-ascii?Q?kPyhin/PmzlIl2dWBAWpLxaLrxXapGaVeNPmVJ+hXthQ5lPSzqyTx7t05tqF?= =?us-ascii?Q?JmgScpKUhZoe0kB5pdEzWn0YEfYwLbjgKYL7SgAjrKYH+0J00sLoQyKfrfPH?= =?us-ascii?Q?4XjOzKQZetexWPxqMx8+Qz8XsSC5YoUG3eI3D8zK6s6SSM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bEd7igJlvXE4YeGXwF2bzCPndr5EAfTLCnI/lkh/T3/0hmeXLgq?= =?us-ascii?Q?4qrR19RU85xuWy972D34JDAHFq0j1V+eBfqPbm2nHpheTFkHOVAMuy/?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 6:5F/NID181F9/gvHpAmVkWsOaOYBFD+SbXEcn9xoUIs5jYHrmlCtZsT36QPkn4WLofVzTRkmj35aXghYFSYbwy+6lTY/ex080zs0suDEekKKr1R7DqtikOToL+EdWpQL949pIK+s3bGX0wk3Mvi4cXmAUJcHbr+vmz8zpNJ5+34CtBvM9N61DSQ9kiJdYVD0t3EonUVVNh2ZzjZb9/xpQEZf9atV3xl4qofbDtgwAnPnO0iAWhRESC/N2IM6SeMdiitxtwn9i6vBM9ssmmta8OW4i9rM++tzSBy4VhrCg5Xerx9tpcbVqWHorAyZPvJUf6cYZwUfab0J42Yc3fNb6ww==; 5:STdNV3FQVnKHN9nk2w8T9/2pQZq9qCFoz/H4sGFAnD/J2vACpxPs51qVgHQDX7UboMJA5gnwbT4Pk9/8oxf7HMWYC9sWYB+nkd8eV+PL+9JY5av4weMGy5YCvZAr39oR2nd1vNv112/p+XGmDD29zA==; 24:jJ4vplTGlvwf21jtikQnxRRxmrU31yAEXjPvGboVRTEiWo7nKNw7BXNGWwCXfD82vMjgidH3Qsl+rRMZulfUegta84eO1zjz9EFM+v6743M=; 7:3G+mnTc4GbVOFJUbtCqT2UiEpRyb2cjwyk9hfto4CTi4w54RqnMIhjFjphNYfTru/qIZWMUIcBvTy8+qQHFZhapQ3flRkmWcCaUHKqRru2tYFP9Ehsr6ZiBQrS9CBvQSRHd2sc9IhkNlMfAuXv6pR+/lLgXG+/EVvJTpeZ9M/IqO4Oq3gR+b5JZlwQKmLJSV+wogiKuX5wvacLyVkF06lHXxoN4W3XC7NeLvPqraygk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2017 16:53:40.6196 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2521 Subject: Re: [dpdk-dev] [PATCH 1/2] eventdev: add event adapter for ethernet Rx queues 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, 10 Aug 2017 16:53:48 -0000 -----Original Message----- > Date: Wed, 9 Aug 2017 19:24:30 +0000 > From: "Eads, Gage" > To: Jerin Jacob > CC: "Rao, Nikhil" , "dev@dpdk.org" , > "thomas@monjalon.net" , "Richardson, Bruce" > , "Van Haaren, Harry" > , "hemant.agrawal@nxp.com" > , "nipun.gupta@nxp.com" , > "Vangati, Narender" , "Gujjar, Abhinandan S" > > Subject: RE: [PATCH 1/2] eventdev: add event adapter for ethernet Rx queues > > > > > > > > > > > > > > > > I don't think we can rely on there being another port available -- > > > > > a user may > > > > have configured the sw eventdev with all 64 ports, for instance. > > > > > > > > On that case, irrespective any scheme(callback vs non callback) the > > > > adapter creation would fail. Right? > > > > > > > > > What if the user is required to calculate cfg.nb_event_ports as a > > > > > function of > > > > the RX_ADAPTER_CAP_INBUILT_PORT capability (i.e. add a port if the > > > > capability is not set), such that a reconfigure is not required? > > > > > > > > We have only one NON INBUILT eventdev port per adapter. Right? i.e > > > > in the v1 spec it was rte_event_eth_rx_adapter_conf.event_port_id, > > > > How about it can be rte_event_port_count() + 1 ? Since we are NOT > > > > linking this port, the context call be kept in adapter itself. Right? > > > > > > It could be. Thinking on it some more, I'm a little concerned about doing > > configuration without the application's knowledge. Possible issues that could > > arise: > > > - The user later reconfigures the event device with fewer ports and > > > the adapter's port becomes invalid, or reconfigures it with more ports > > > and begins using the port the adapter is using > > > - rte_event_port_count() + 1 extends beyond the PMD's capabilities > > > (the sw PMD is hard-coded to support a max of 64 ports, for example) > > > > > > Having the user be responsible for the port configuration could avoid these > > problems. Since the user needs to check the pair's > > capabilities for the CAP_ADD_QUEUE anyway, they could also check for > > INBUILT_PORT and decide whether or not to request an additional port at > > eventdev configure time -- thereby ensuring they don't waste a port when using > > hardware with inbuilt ports. And this keeps the configuration code in one place > > (the app), rather than spread across the app, adapter, and potentially the > > conf_cb. > > > > OK.Sounds reasonable.May be we can push the responsibility to application.We > > could have a helper function using the proposed adapter API. That helper > > function would create the adapter based on the capability for the _default_ > > case. > > Applications free to use the raw adapter API to get more control if required. > > Otherwise we will duplicate the code in all the applications. > > > > Makes sense. Are you thinking the helper function would do stop + reconfig with additional port + start + setup port, or just setup the port with an ID the app supplies (only when a port is required, of course)? The second one could be done with little additional code -- the app just needs to check if an additional port is needed when configuring the eventdev, and another helper function could take a list of pairs and return true if any don't have an inbuilt port. I am in favor adding more logic in helper function(I believe, first one ) so that it will help application reuse the helper functions for the normal case.