From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0067.outbound.protection.outlook.com [104.47.38.67]) by dpdk.org (Postfix) with ESMTP id BCA032A66 for ; Thu, 8 Dec 2016 02:48:08 +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=j0ofSWDfxytqrnyLhkBZzLI2c95/Ei5Yny3/qRHyBmQ=; b=edELJDidYT+gekf4XNIqcpF5kPpLVMvC4FEwyHlj+Bef0pxD5YcYXkijyi+gYqaAUgGekX4+HaWOolPCXpJ1w3KL8tdtL14zKUvwItITK/31mWZz9pHhcTvSE0FJaIbBbVg13dstmE9K+piuDHtcRnAferjgxv8MUetiDcl9p9c= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from svelivela-lt.caveonetworks.com (50.233.148.156) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Thu, 8 Dec 2016 01:48:05 +0000 Date: Thu, 8 Dec 2016 07:18:01 +0530 From: Jerin Jacob To: Bruce Richardson CC: , , , , Message-ID: <20161208014800.GB22031@svelivela-lt.caveonetworks.com> References: <1479447902-3700-2-git-send-email-jerin.jacob@caviumnetworks.com> <1480996340-29871-1-git-send-email-jerin.jacob@caviumnetworks.com> <1480996340-29871-2-git-send-email-jerin.jacob@caviumnetworks.com> <20161207111251.GA22932@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161207111251.GA22932@bricha3-MOBL3.ger.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CY1PR01CA0042.prod.exchangelabs.com (10.163.94.52) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 2:6OWPMWALQLZxVmvtUXUMDLvxmqLODMJLeas1nL9I7eHcyS9l6fqnhs6Fu0nMxi5BytGYVUYZIRZjVGc5TSbpHwLFoFrwIridFp/V/hmk/2yd2GgI/fqw4bPgIGBnLEgLnJBsHE2p0og0d6T3080YX/Pi/fQLmSYc0gYQwBNVpQo=; 3:UOmpYWOz+J+4xT7fUSsASEJotahFLVNs1IpGz/UjtKFOHV7f+eES2zXqZav++tlsT9sw1+cHsKsYSW2xCdWesKpK6K3yoYMQ2iJHnaLwAPUID/pTBd4WyN9Y8nHED+eKdzcc+gxikzTwEDuWwrKlGykrDmag+4QUIeSvQuUG74M= X-MS-Office365-Filtering-Correlation-Id: b8d6f322-6e7e-4941-b424-08d41f0c4114 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 25:1e4CaYxx/4UPb4kqQmqfT+FMLeLDeKIuuOWq78vMke3lmiGEotHPQAQGsaC9FfjGHdWLNYURpluQONbTT6ALxrQ4wZ48uTbF31TKaA9YPUpQMBiVAkpuzT9b7dQKXbaKDfoe1AopwkDyRivytdET4DHqAL4PSEDK1tGQQfwzdSRRG/1pydxfpjIL71hHyYv3UR/WUNb+pQDNXfjyIYaGs3No3hfR2llWShVw1p89OHZFkEhsVdefb8ShgeYskHXZAJ5SAK7Cmomlos5EVySHtgLXyct4PAm5fCtxDcNtwWsIcKWS4R9y3dJCoiWniseN/6mu6ANblqCcn6UlwR/XvMcqTMO0Lno3tDRhlArgHzCq6bzb+WRd1yjKMef/5v3AIlTitFnWukGbRETcx7hRaHiTdFsT4aBVLn26hyg/JlzZDJ/Tp1PI4Ze8dFEVLX5IMKCu2q0hCSXu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OEDa0HdAxA+qPatp0xcyoz8R6J9Yn1glbapDYWK9GbeMzOORUzqMGDXyn41zfM0lVoKlVLVAkW5K9FrfgyzPhSKZEFLCVAWtuqt7sd9xEdsFLEG8XTbs5qyGHXPiTdiD5peWxKe3EEVWzxsrhPzR46cCcV5QeOJcAYze71UGJdG1yO2Ax5U7WAvVlT558nzQObpEKZYWSe8mGBaFG6PkHJBBP/Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:8B9WSccG9xL+XpxIasIAo4t8y5k1T6Q00fACTsEecEBfbtgtLVg52I/ErNL88g2tpCVvLIQgwR22XK0pG8gtxsPVarEUFcK4Ip8ETpyjesNCDYvfJTHyTOXsux468gfuWa7eupnzRNHW2xSsJYSbCX3V2jTePDmc0WgXIrJplRIGOo8KCdwDHeyKKySMpugzv/5tESVCbW1JqkfUjTUPBRbA6+MaCRLc2IJ1WtR8vDm0iPz//nFnKQwFN5ZUAVRlaAsEsNsJQ8Px4OUsYaeVm7z7SICBnItIIyVOFMYueb7AgM7xjipTQZ7oZ+rfcC35Z9R61myiJrwoKfMgr+fW8Hwuz6qiZZqeuue60kBX6FnPh7icI097eA3ig69bKXR8QW6XPqhEsL/2ZKag9u70nn56Iqzyr2w6mzZp4s6pOSGC9Orc9TGCFzqf8QfyEU8p2JucDLtjT/obpcWDvHjPFaaVKbm24OfaBBAq2XSqSozL319l+Oo/B0BYLusZfgiGalA/Ak20EAPaAz8bwBXps0mnG+yxwXLMZGIwEGv2e92YqvKDt91KIrfzqae36EXtrdrMwcFmtkwnk3dTl0zjkhBTV/phZSG1WVDBaxtrhthmOlLnQkIm+9RWDSJ8rv1V X-Forefront-PRVS: 0150F3F97D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(7916002)(39850400002)(39450400003)(39840400002)(39410400002)(189002)(24454002)(43544003)(199003)(50466002)(2950100002)(733004)(93886004)(42186005)(561944003)(76176999)(9686002)(69596002)(66066001)(106356001)(189998001)(46406003)(97756001)(6916009)(6116002)(1076002)(38730400001)(105586002)(3846002)(23726003)(101416001)(68736007)(6666003)(42882006)(33656002)(229853002)(2906002)(4326007)(7846002)(81156014)(5660300001)(6506006)(92566002)(4001350100001)(8676002)(81166006)(53416004)(305945005)(50986999)(97736004)(8666005)(83506001)(54356999)(110136003)(7736002)(47776003)(18370500001)(7059030)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:svelivela-lt.caveonetworks.com; 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; BLUPR0701MB1714; 23:n0irvfJN/BkeAA2tf92ic3G/08a8yjvMiF8ac3A?= =?us-ascii?Q?TyRvyoxYsRiqXj2bJFNtI2zEapYvlrzR7I/HkMg3nPW1gr2S6rxgsi8G9sJq?= =?us-ascii?Q?6GrGS0a+ZjnN3UAcPbRisgJtX0zbAt2ogdpN6LDKpqen1yAk2/MH8UQbulBP?= =?us-ascii?Q?VAlKt9/bqCC2GI1mA0VT/pQmba6eDP+E4eHThM2beJw7/FN78yPtF6wKoOBd?= =?us-ascii?Q?XDhNIdP6m+czMUbAI0+bhX1TV191lNtOvFb9iYBwLRXQRISW9q/foVObsRfk?= =?us-ascii?Q?7A7huxDNxC1Q7yQjPWy43wjxsipMaj3+hmmsc2lcWaR4SqcrS+QcruXP2wzL?= =?us-ascii?Q?4UuZZ9p9WgN8bQt4xf0Q1O6XAbA4H3bMv2Zo0srAB5/6puxbbUfv0RWF4mAA?= =?us-ascii?Q?vt71Z7JeLEyPnu+bDkp359Q2lOVs7WA312+zOElLPeQjwWfaOzkmLc+SgWUS?= =?us-ascii?Q?2ow8anbrmKNFohUscuX0jdRvOUIaJaQXWv3mmb6qaUswliR7QbmD9DN5LnxZ?= =?us-ascii?Q?GIr4HrJ0CVSTU2hc/dY545prn7l5wmcZt4rNGfN1nT4mSLCYaaLAPTqdzSZ2?= =?us-ascii?Q?Mve1m5UjEHVXl6ldRgxCGwadNML8bCB2UfMjhUrmJC1Dc8dFv3Ms7oDkkBjv?= =?us-ascii?Q?519C8v4aEzDKjkNFTC7ZdUO6/lcnQiXKcXtoveSf58M/XGzS27d3hAx4NujC?= =?us-ascii?Q?607acavwH/3pBhxoPoih4drsOBJn/eAdCPH0/ANL5zt110EKyb6Y3MkCQvNE?= =?us-ascii?Q?eW54o2jEHN7dw6giOkMkDN08hdeumkgboE/eUEzyEwc9g9OSr2M9+De+PDR3?= =?us-ascii?Q?cBWKM1Ah0dD8dieU79sR4vvbiNJWWsMWu67+pFOKP7a7q6QnJbZXSU9LUk9C?= =?us-ascii?Q?QNYLmTfD2SF8UnfIcQszADn9youEPgA2v/KbgtEeF9B4VncBRvPf4P7YpH9A?= =?us-ascii?Q?IiS9R0No2x1YoKVkMPGNZrBm2XHzdU2+Z70OesWflAKG48N3JY6nw03XG4nh?= =?us-ascii?Q?zfX2SnK0ffdpVvSOczFAoG6I3bT4PVRYmy5bN8DaPv1sSC4IlPeSuOlrm0xT?= =?us-ascii?Q?07hThIrvZXHkD4Ts4HTPzcdsqyQIVm9RVM7zYux9br61GsFaYzbnPED9dKA6?= =?us-ascii?Q?W78lfByUbftLvniAQFtMcgPpJGS1619INxOQWjzDxWqmwz8ATUgC0GFB3LnZ?= =?us-ascii?Q?F/t5aUSSETUsGagAMYgARN34onQQGQDf/W3C1D5AwymdzUNsf56esvN+GzvN?= =?us-ascii?Q?uvR4ix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fwds= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:LHRK/3NGuo03svXtUX7GIbB9QfcPx0I9TFQKSdEJl7WDxKQIaPBOTjXstkT5MkrEihHFfJAXMJtfRJBG+uotyTvNZcLcYzn9+jo4oSzX3ZipJA/FtWiKoy3qHU3RSDKqxxuzqUTwIVdohZvJYL0aVS1A/l7L3j+rtzn9XNRiBT9hj2IqjQcTSaqDsA3UF/X8YmTO5e/7UoemyUWnQgGYFNk8XuHSrEC9V7QnfoAL2YpuJC4+FU9pH5x9QNTNasNAWcaN9944R3ah1Wcsmh0Ua1oSGrIxHoxhGX0jR5OunJbeMnN6vg+LDIUenJdNWM7YM45GGJW0YZkz8PHWKbrxW5qFc2EnFOT3h4+E7w/iWtA= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2016 01:48:05.1250 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v2 1/6] eventdev: introduce event driven programming model 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, 08 Dec 2016 01:48:10 -0000 On Wed, Dec 07, 2016 at 11:12:51AM +0000, Bruce Richardson wrote: > On Tue, Dec 06, 2016 at 09:22:15AM +0530, Jerin Jacob wrote: > > In a polling model, lcores poll ethdev ports and associated > > rx queues directly to look for packet. In an event driven model, > > by contrast, lcores call the scheduler that selects packets for > > them based on programmer-specified criteria. Eventdev library > > adds support for event driven programming model, which offer > > applications automatic multicore scaling, dynamic load balancing, > > pipelining, packet ingress order maintenance and > > synchronization services to simplify application packet processing. > > > > By introducing event driven programming model, DPDK can support > > both polling and event driven programming models for packet processing, > > and applications are free to choose whatever model > > (or combination of the two) that best suits their needs. > > > > This patch adds the eventdev specification header file. > > > > Signed-off-by: Jerin Jacob > > --- > > + > > +/** > > + * Link multiple source event queues supplied in *rte_event_queue_link* > > + * structure as *queue_id* to the destination event port designated by its > > + * *port_id* on the event device designated by its *dev_id*. > > + * > > + * The link establishment shall enable the event port *port_id* from > > + * receiving events from the specified event queue *queue_id* > > + * > > + * An event queue may link to one or more event ports. > > + * The number of links can be established from an event queue to event port is > > + * implementation defined. > > + * > > + * Event queue(s) to event port link establishment can be changed at runtime > > + * without re-configuring the device to support scaling and to reduce the > > + * latency of critical work by establishing the link with more event ports > > + * at runtime. > > + * > > + * @param dev_id > > + * The identifier of the device. > > + * > > + * @param port_id > > + * Event port identifier to select the destination port to link. > > + * > > + * @param link > > + * Points to an array of *nb_links* objects of type *rte_event_queue_link* > > + * structure which contain the event queue to event port link establishment > > + * attributes. > > + * NULL value is allowed, in which case this function links all the configured > > + * event queues *nb_event_queues* which previously supplied to > > + * rte_event_dev_configure() to the event port *port_id* with normal servicing > > + * priority(RTE_EVENT_DEV_PRIORITY_NORMAL). > > + * > > + * @param nb_links > > + * The number of links to establish > > + * > > + * @return > > + * The number of links actually established. The return value can be less than > > + * the value of the *nb_links* parameter when the implementation has the > > + * limitation on specific queue to port link establishment or if invalid > > + * parameters are specified in a *rte_event_queue_link*. > > + * If the return value is less than *nb_links*, the remaining links at the end > > + * of link[] are not established, and the caller has to take care of them. > > + * If return value is less than *nb_links* then implementation shall update the > > + * rte_errno accordingly, Possible rte_errno values are > > + * (-EDQUOT) Quota exceeded(Application tried to link the queue configured with > > + * RTE_EVENT_QUEUE_CFG_FLAG_SINGLE_LINK to more than one event ports) > > + * (-EINVAL) Invalid parameter > > + * > > + */ > > +int > > +rte_event_port_link(uint8_t dev_id, uint8_t port_id, > > + const struct rte_event_queue_link link[], > > + uint16_t nb_links); > > + > > Hi again Jerin, > > another small suggestion here. I'm not a big fan of using small > structures to pass parameters into functions, especially when not all > fields are always going to be used. Rather than use the event queue link > structure, can we just pass in two array parameters here - the list of > QIDs, and the list of priorities. In cases where the eventdev > implementation does not support link prioritization, or where the app > does not want different priority mappings , then the second > array can be null [implying NORMAL priority for the don't care case]. > > int > rte_event_port_link(uint8_t dev_id, uint8_t port_id, > const uint8_t queues[], const uint8_t priorities[], > uint16_t nb_queues); > > This just makes mapping an array of queues easier, as we can just pass > an array of ints directly in, and it especially makes it easier to > create a single link via: > > rte_event_port_link(dev_id, port_id, &queue_id, NULL, 1); The reason why I thought of creating "struct rte_event_queue_link", - Its easy to add new parameter in link attributes if required - Its _easy_ to implement PAUSE and RESUME in application PAUSE: nr_links = rte_event_port_links_get(,,link) rte_event_port_unlink_all RESUME: rte_event_port_link(,,link, nr_links); No strong opinion here. I will go with your proposal then > > Regards, > /Bruce