From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0040.outbound.protection.outlook.com [104.47.33.40]) by dpdk.org (Postfix) with ESMTP id E98D21023 for ; Wed, 2 Nov 2016 09:59:52 +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=xycwmEzZsmC+tXrvc93cR29TBaXWvCVTyKorbWrBnFM=; b=WTDECR8Qt2KkhyvNem71gxfxQ2Nx8BphaVHWBZJdqmVaJLEM1K/fM61qF1gG/3m6Ld2ln63w3QoFZ1zQ+SNh0Qj5yNXSCUhIqk6SqfMYI9z3vtAbdE6T72OpkOQajmYcdtkEg4hFMlHw4ObgUo/dGUn8fqWNNaUoRLGz+jb8Zsc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.167.46.37) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Wed, 2 Nov 2016 08:59:47 +0000 Date: Wed, 2 Nov 2016 14:29:27 +0530 From: Jerin Jacob To: Bruce Richardson Message-ID: <20161102085925.GA25740@localhost.localdomain> References: <20161005072451.GA2358@localhost.localdomain> <1476214216-31982-1-git-send-email-jerin.jacob@caviumnetworks.com> <20161025174904.GA18333@localhost.localdomain> <20161028141617.GA97736@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20161028141617.GA97736@bricha3-MOBL3.ger.corp.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.167.46.37] X-ClientProxiedBy: MAXPR01CA0064.INDPRD01.PROD.OUTLOOK.COM (10.164.146.164) To BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) X-MS-Office365-Filtering-Correlation-Id: c587af61-0b78-4dc9-c863-08d402fe9b0f X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 2:vyN5Ds747K3u7BV1gMunRsLQNbMmamWP4KcbMgRyOWcv9klnxNw807uSA2q7SN0KEFannZRd7pllTdhdhli5dcGrIIjCCm0O4MioSy2RXSFJZyc4SVWy2ZvhKTXYwD13McbMO3s8llMIVhG4s9B/ye8nZUvDfrD2dtxc+afNBWehuq7nlgZAYYihPbbgTEiAvvPPacWzDNarFLKOYSpBHA==; 3:yDx+9cFn/FoOqn4aH/5Oje7kAOECd6UhuRZDLH/INaOMdZoERjGSWWMbNypb+7JbBFXqgAXWYbcbm81Pkt0TnddVGu9MuWt8NnVTWDAiKA+vDdLVWdxwivnh3BWN+DzpOdw3FQ5zho384zU+L1nNuw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 25:tYjZ0GHsXYYA5EGOCFZBWjSvUi2hH+g4CJ9q6nEuD/Gn9NDFQYPERNq5UxbezIAEsEL0HFi/avp0/HrY2eWidiMBTvrwLq/jXWfJBEUU1B8kc9mZ8+ihrzs4zo0p5OqW9I+QgwycOprhHUDSgG62wRX5QKAi90sr4wHNEzWY4J4tuRvAhpYo9tQIYbzrzNG/CyKzwhkJwZJlmryP8p2IYVV45Dng/srdSnH1UbKZHhzxrEQj5eyjF3gpaxpfB2b4EMxCKtcZZ/ocHQ1IzMUHUVxY6a5RShzgo/DUgbBddw46h0zBQP2sXqbJJSiXPdJn57JXnIHjaf9G2CFlgNnWgHEJiwUDz6vdNYzC+wcBWbvzA4qhw7b9dnp/yEU/AF/KKueyLbFi19bKQMTpAGp4V00kyJGRhkCAWqxog45BE6Gcx8j0pKDrkwK1t4fgCt4RwFG7iN/juwie+8qKcFKiD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DOYwpX8EOgjuKc/0em+Gv8buS79vNyB75G5t0ddisw/iPW8I9NRzKfk63iqbBtNTXT82PqMCbdsI6MbHldEVzDpFB7g6abmrWGGQeLhpuqZxAli1iBgkE7KmCgqqquKtdTal7x9eL/psiAzZXbcgd2vMkimwOgQHhGNppUd6BkUfBpnM65HbUwO8YsXicfurKNqILnsfyb8x+QIsykXbRmL2f9NuVlXvzxd6tOUNViTf958yMlM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:zGzWfAAOrjcFXWren7l9LU8csas/8eA1dgjQEOes6NgEB4Ag/Ots+EZM4y9N4pt7Deb1IUsitOvypm1KozRI30h75Q9nTTrk251CyCDT60IuA5G8PdnM9qTOmmuKDS5jnz+Yw21iiNlhhx7+p7ysvCnNfaLSBO+JFvi/HxiooTLRBL6DtUrLCeXE7g3NDhvZWnw733vSd+WsdiGP1OX4zfIAv+Tr8gaOs+Zt5jcThhXSyHy5k3AYHtjPqQkPeK0q0tPknp19Lr/ay5VDg8rRE+QMSC8e1wvAKiurGi3zZNuRmjiIJWwxnmflu8KZB3OhyQb6FDxD8E70RL9+pLg3rsWncpALkDuGtwQj941+9xFPbI3WKesTh7zXQjJ3z2jbAWzL+RquEGcno0WWBhGK8w== X-Forefront-PRVS: 0114FF88F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(24454002)(199003)(13464003)(189002)(377454003)(53754006)(77096005)(5660300001)(54356999)(50986999)(110136003)(76176999)(6666003)(6916009)(586003)(23726003)(101416001)(1076002)(6116002)(3846002)(46406003)(42882006)(93886004)(2950100002)(97736004)(4001350100001)(15975445007)(189998001)(97756001)(68736007)(66066001)(8666005)(305945005)(7846002)(50466002)(7736002)(92566002)(15395725005)(8676002)(9686002)(81156014)(61506002)(106356001)(47776003)(105586002)(42186005)(33656002)(81166006)(19580405001)(83506001)(19580395003)(4326007)(2906002)(7099028)(18370500001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; H:localhost.localdomain; 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; BLUPR0701MB1715; 23:aumOwXyxvw160FhNiozImUzSVzOjBf5K34Z5iDp?= =?us-ascii?Q?6X6QzhyqgJX/TU15ukFRRU2at8JB3vCDlA22vZ02r3EsDz6jptZYVSfpgyHp?= =?us-ascii?Q?TgoT4M1BBSc6AMUeIUC6vx5Ydiqo5vaUkLxy8lnx8F79pGUdgG1vVwpSI5Vn?= =?us-ascii?Q?L+FsL+alrer6iuZq5oNkuBBwkiKYfJYrrXwMBBhiNP38oleuHwghJxH/4LFd?= =?us-ascii?Q?/cTGh78omkYNgYEENxVi0kUlBGInDDaqso1NAwxkxoJu81FNaC4TmLeQDpUX?= =?us-ascii?Q?i8sjd5onVc24XevuoLS1Menj/41oeskDF/ayjxAxTVzYYBZYbWeTFXjNlO+F?= =?us-ascii?Q?cjPOlei9m9g6boXYjIm83R3h3L/gbJBX0sLaXJpxy51Q2ZYMuJxv1N+WhikI?= =?us-ascii?Q?ha1cp2IesL4LB1TJbPTdjIJREZaBNI3qyAHE2cYHuFAbEhiyYR/baogYMEOP?= =?us-ascii?Q?ni86m/bB2Q+erOyA7UstMB2c995zg4cuz/mL7tFBi4ypqMg6aUh2+6gPITvf?= =?us-ascii?Q?io20SATHrnfsy4hjH42uBdg5eJg5DiaSaAuFn6g7cXCT+JUS6b4nTVyy7z6l?= =?us-ascii?Q?hBrRhbWnbBH4L/EV3Mgjp7nOVSLSNcoG/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A= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2016 08:59:47.7892 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Cc: "Vangati, Narender" , "dev@dpdk.org" , "Eads, Gage" Subject: Re: [dpdk-dev] [RFC] [PATCH v2] libeventdev: event driven programming model framework for DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 08:59:53 -0000 On Fri, Oct 28, 2016 at 03:16:18PM +0100, Bruce Richardson wrote: > On Fri, Oct 28, 2016 at 02:48:57PM +0100, Van Haaren, Harry wrote: > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob > > > Sent: Tuesday, October 25, 2016 6:49 PM > > > > > > > > Hi Community, > > > > > > So far, I have received constructive feedback from Intel, NXP and Linaro folks. > > > Let me know, if anyone else interested in contributing to the definition of eventdev? > > > > > > If there are no major issues in proposed spec, then Cavium would like work on > > > implementing and up-streaming the common code(lib/librte_eventdev/) and > > > an associated HW driver.(Requested minor changes of v2 will be addressed > > > in next version). > > > > > > Hi All, > > > > I've been looking at the eventdev API from a use-case point of view, and I'm unclear on a how the API caters for two uses. I have simplified these as much as possible, think of them as a theoretical unit-test for the API :) > > > > > > Fragmentation: > > 1. Dequeue 8 packets > > 2. Process 2 packets > > 3. Processing 3rd, this packet needs fragmentation into two packets > > 4. Process remaining 5 packets as normal > > > > What function calls does the application make to achieve this? > > In particular, I'm referring to how can the scheduler know that the 3rd packet is the one being fragmented, and how to keep packet order valid. > > > > > > Dropping packets: > > 1. Dequeue 8 packets > > 2. Process 2 packets > > 3. Processing 3rd, this packet needs to be dropped > > 4. Process remaining 5 packets as normal > > > > What function calls does the application make to achieve this? > > Again, in particular how does the scheduler know that the 3rd packet is being dropped. > > > > > > Regards, -Harry > > Hi, > > these questions apply particularly to reordered which has a lot more > complications than the other types in terms of sending packets back into > the scheduler. However, atomic types will still suffer from problems > with things the way they are - again if we assume a burst of 8 packets, > then to forward those packets, we need to re-enqueue them again to the > scheduler, and also then send 8 releases to the scheduler as well, to > release the atomic locks for those packets. > This means that for each packet we have to send two messages to a > scheduler core, something that is really inefficient. > > This number of messages is critical for any software implementation, as > the cost of moving items core-to-core is going to be a big bottleneck > (perhaps the biggest bottleneck) in the system. It's for this reason we > need to use burst APIs - as with rte_rings. I agree, That the reason why we have rte_event_*_burst() > > How we have solved this in our implementation, is to allow there to be > an event operation type. The four operations we implemented are as below > (using packet as a synonym for event here, since these would mostly > apply to packets flowing through a system): > > * NEW - just a regular enqueue of a packet, without any previous context Makes sense. I was trying derive it.Make sense for application requesting it. > * FORWARD - enqueue a packet, and mark the flow processing for the > equivalent packet that was dequeued as completed, i.e. > release any atomic locks, or reorder this packet with > respect to any other outstanding packets from the event queue. Default case > * DROP - this is roughtly equivalent to the existing "release" API call, > except that having it as an enqueue type allows us to > release multiple items in a single call, and also to mix > releases with new packets and forwarded packets Yes. Maps to rte_event_release(), with index parameter, its kind doing the job. But, Makes sense as flag to enable burst. But it calls for removing the index parameter. Looks like index parameter has issue in Intel implementation. If so, may be we(Cavium) can fill the index in the dequeue as implementation specific bits like Harry suggested and use it in enqueue. http://dpdk.org/ml/archives/dev/2016-October/049459.html Any thoughts from NXP? > * PARTIAL - this indicates that the packet being enqueued should be > treated according to the context of the current packet, but > that that context should not be released/completed by the > enqueue of this packet. This only really applies for > reordered events, and is needed to do fragmentation and or > multicast of packets with reordering. I believe PARTIAL is something, HW implementation will have trouble. I have outlined other way to fix without coupling fragmentation logic in scheduler. http://dpdk.org/ml/archives/dev/2016-November/049707.html If it makes sense for everyone then may be can - Introduce "event operation type" bits (NEW, DROP, FORWARD(may not required as it is default) in enqueue - remaining bits in "struct rte_event"(128B) for "implementation" defined - remove rte_event_release() and use event operation type(DROP) as replacement. /Jerin > > > Therefore, I think we need to use some of the bits just freed up in the > event structure to include an enqueue operation type. Without it, I just > can't see how the API can ever support burst operation on packets. > > Regards, > /Bruce >