From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0089.outbound.protection.outlook.com [104.47.42.89]) by dpdk.org (Postfix) with ESMTP id A6BC81AEEB for ; Sat, 9 Dec 2017 10:26:24 +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=e34VShd/RAB4Du8x/GmMU5YJG046oSEgf+2ByjFh3XE=; b=JZUQOiLRY43F9RXiZ7sObRoeevYy9T5Tzgqp7i9qEKTequFfpEjH0WUW01dAerE7NPyS+W8ssl/ryucWAyNRTL8gRpX0DGEU7VSbvUIbdVeVE1KxrEiTIuN+A0KgF8jpDzftj2VlyWia8ou3mA9zW+7BeDJBfBNKetPN/vjqBMc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.104.209) by CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Sat, 9 Dec 2017 09:26:19 +0000 Date: Sat, 9 Dec 2017 14:56:04 +0530 From: Jerin Jacob To: "Van Haaren, Harry" Cc: "Eads, Gage" , "dev@dpdk.org" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "nipun.gupta@nxp.com" , "santosh.shukla@caviumnetworks.com" , "pbhagavatula@caviumnetworks.com" Message-ID: <20171209092603.GA13525@jerin> References: <1512011314-19682-1-git-send-email-gage.eads@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.104.209] X-ClientProxiedBy: BMXPR01CA0045.INDPRD01.PROD.OUTLOOK.COM (10.174.214.31) To CY1PR07MB2523.namprd07.prod.outlook.com (10.167.16.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 172abbd3-f0a2-4e70-b53e-08d53ee6e946 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 3:pVeSBBpH1ox3+9+NEXJ1qhFva7I5kDX/E6/7E2W2D7UORvxWUPFw9Tj9zNCncbtM111pBnlgw4JzOSB2YPX7KeL4gK/w18g5jlXQpUoqNIVtU6FOcIaYG1NUw0e7xxQ6GF3EuafsemQE16UTfHgyEckKJB1tvyX4KfUZthzV8jCTmxiPJc5Wp5cxhWeCrQOhK+m78B6MIU3LufFmNyzs2O45xeuVqLQPKZhq3J2D/ydXXYlIOVURzBOZT7kDBh3j; 25:fdNo8VYpL6UiF2fQw899m89E5As75auYiaMZE5bAL2jotxfUxWDk5JBwUVP8bFhDK2rLqZw5j4T76fsLnPx2E80sv/IyhXWrcZUWO57gFhjPzuBCuAHTD9bt/n8IeJ2ZYiqQUZh6yYY7UhinXHlfJTkF94JCG/aN29bus/mpSjwItQURGczlWW3l5H4/Nc5PpPcRkiSV3T0wWbkRnbOWSpKfCVMto2Ds0DF8vK9DeXdeWqqtyZD3AOy4UCJ8w/MAegCsi+rJ5POJZnRF0QQz1FL1/GpvAwDQvJtkk+n6ogC/JieX2xGbqXVCKDjfqsytBtnEa0Cdmplf2tk/LFaYvg==; 31:Laxe4+lCYtAjnvvLkB+r0NdnSy+tpJJJgMUhX9BoY8U2pnV/BOC8JJhbcRF0J40L4tFEnKPnep77aFOfC+QZ++E5wymg+DV1w6nhkDvh032qgU9air4BBBNKcWXTrgEOHJcgGFxDGLi3xbuiBWK3Ev3e9itKt8xDvsa+HaYnesIQk3a5NLJQ+5V72FXNovv7XZIn4sTKG8lMYQLqU+oyjOOuxx8SVEWC9HO6tdqG/n0= X-MS-TrafficTypeDiagnostic: CY1PR07MB2523: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 20:R/gCnGSYW5RWxSaR3DQPvNo88iFftsJxX6eUCwTJ2iyue1QtyAbeUAdySr1K1jHx/gt+n/BcSY7y332AmCZtVeGhFtBzQguTVP5lM8WoChBi/IIGLBJ0sMv67FQMdAK3durw8CcFrTaMO4EEd0K5igseEPafafFhtrsYl6OxHfcMJieWw7EQNuhc0/jdeY8qF65Gqc+alkuvFA901isbErtbndFW8Hvng97wIaJIS5jvRz7NRiwoE44XY6EJ7uKYd7Htv5/82FXQloXg+Vd4SPgCWrJxpimu72n7m/V/AceUwqIMRZh5b4spWgY9H6yGoPHn9brTwI6ZSP0AmIRvsnW0Yc6Z9zJ8jKdMyfJ4vggisChZ1RtJcqrAH9h6imFdGBIJ9UWnkZ5j9BsNWQ+4o7UrbIJWixZMesg6cuLwPSvlwzEhCKkCEOOjiE/LaJ6Y2XDzbjF43pDYGxPYwmKq3mDKzPMHecLOdp86Jy/fCqOYw+bsbDFAXQlBXrM61Ll6dr5UmuKwsk2zUBw6r/TU9g4fXoc9LKvPfeuJvxtrYVgbeEYRYgECWQBP6yPNImO53A9PkfY3/XTtlGp833PuM8E1rKhuemLf5Co3FmyXYCc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(3231022)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR07MB2523; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 4:Yq53bhBq6Fw/1y1Xn1MCeuigHUNNJnBUTA0OBehqiVYHNfqtC78/q5q9mZn/MvobZ+liOZ5YNDPxjRfTdsiYaW3JlJUtRZUiVGX6yHZHUfz9Vx9CZ4/fRvUKgljrbVk3Y+En1n4NbRfIHmu7eqjNg5hLS87jqld7mhM1Vp+bILhW03Wo08hY76aCLt1QqKqwcP3TnklJyVSudiVhS3f4/mbI+wg0tY+BSLjjCLf3Ceqjkia7LWA9YBwZZ4WorXk1V1iA0B5sqFKqvHIG0DNtJ1sHyp9yDBA3quwQH1DVpaSbj1g+IRISDkyenM5+jEwj5et5iMfdAT+feMWCIjt5u/vEr2+JrTrlX4LIEPnwcqM= X-Forefront-PRVS: 05168A3970 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(199004)(189003)(13464003)(55016002)(68736007)(16586007)(478600001)(305945005)(6916009)(33656002)(58126008)(72206003)(54906003)(6666003)(53936002)(33896004)(47776003)(33716001)(6246003)(16526018)(66066001)(52116002)(2950100002)(316002)(42882006)(8936002)(76176011)(6496006)(107886003)(97736004)(575784001)(9686003)(8656006)(53546010)(106356001)(105586002)(50466002)(3846002)(23726003)(4326008)(1076002)(5660300001)(2906002)(8676002)(81156014)(83506002)(7736002)(25786009)(81166006)(229853002)(6116002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2523; H:jerin; 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; CY1PR07MB2523; 23:2jOJ8SsuPtTyNiW76v02EKF2L7aMaM0UJSwPPO/MG?= =?us-ascii?Q?7Y2xMLBeBFjm6ilhVQWeUQi6/ccalCfj6Hxo9dWjW8A9QnNtXUKzjCA8Ol6Z?= =?us-ascii?Q?UXjvnfHEYRZFSOWAtMoH8gINdMZPXJrKMsDyDmklD/VeKmVPH/+uSuFRxWM/?= =?us-ascii?Q?yo0yN1zcJieVFTKk3NymW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dcwC5T/u54PMrMB6/H8bkaCLEwy99GIZcgRxAfjOmcc3zAX/QvAo/FCH3Q1IsWKMZ2G7n1EFN2aZgOOBGdFOiAB/flDoCia831XuhtBMDPK/x1FZOd4BuV50KMnEzOD0GSoAjgMOx8lmoE0gNWEQWRGi5VEoUK4mz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2017 09:26:19.0230 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 172abbd3-f0a2-4e70-b53e-08d53ee6e946 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2523 Subject: Re: [dpdk-dev] [PATCH 1/2] event/sw: fix queue memory leak and multi-link bug 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: Sat, 09 Dec 2017 09:26:25 -0000 -----Original Message----- > Date: Thu, 7 Dec 2017 17:15:16 +0000 > From: "Van Haaren, Harry" > To: "Eads, Gage" , "dev@dpdk.org" > CC: "jerin.jacob@caviumnetworks.com" , > "Richardson, Bruce" , "hemant.agrawal@nxp.com" > , "nipun.gupta@nxp.com" , > "santosh.shukla@caviumnetworks.com" , > "pbhagavatula@caviumnetworks.com" > Subject: RE: [PATCH 1/2] event/sw: fix queue memory leak and multi-link bug > > > From: Eads, Gage > > Sent: Thursday, November 30, 2017 3:09 AM > > To: dev@dpdk.org > > Cc: jerin.jacob@caviumnetworks.com; Van Haaren, Harry > > ; Richardson, Bruce > > ; hemant.agrawal@nxp.com; nipun.gupta@nxp.com; > > santosh.shukla@caviumnetworks.com; pbhagavatula@caviumnetworks.com > > Subject: [PATCH 1/2] event/sw: fix queue memory leak and multi-link bug > > > > This commit reinitializes a queue before it is reconfigured, such that > > reorder buffer memory is not leaked. > > > > This bug masked a few other problems, which this commit corrects as well: > > - sw_port_link() allowed a port to link to a queue twice, such that the > > port could then successfully unlink the queue twice. Now the link > > function checks whether a port is already linked to the queue, and if so > > returns success but doesn't assign the a port a second slot in the > > queue's cq map. > > - test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice > > from the same port, and expecting the second unlink to succeed. Now the > > test unlinks, links, then unlinks again. > > - test_eventdev.c's test_eventdev_link_get() was linking a single queue but > > expecting the unlink function to return nb_queues (where nb_queues > 1). > > The test now checks for a return value of 1. > > > > Fixes: 5ffb2f142d95 ("event/sw: support event queues") > > Fixes: 371a688fc159 ("event/sw: support linking queues to ports") > > Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") > > > > Signed-off-by: Gage Eads > > Looks good to me, > > Acked-by: Harry van Haaren Cc: stable@dpdk.org Applied to dpdk-next-eventdev/master. Thanks.