From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0040.outbound.protection.outlook.com [104.47.42.40]) by dpdk.org (Postfix) with ESMTP id 4A70B968 for ; Thu, 31 Aug 2017 17:10:20 +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=4roRZGn8VsrCdbBi/x1aebd6Xaa+dt6xAJMS33zMHPY=; b=eUZidqJvtDyRPnljzvxXQvpCRhzmLrBJUw6lc4UVBmCp+xBcsUt8dgCCNWFD9HVHkNsn3C/aBDIPaxmOKX4rmFIG3QbhD5FjcyOZZ54afOlbfWM96TWEfS0OLRAXnYwiJ5OjsVwbS96n5p874aFrxob6RRc9ODfWteUgiQZCxHo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by MWHPR07MB3471.namprd07.prod.outlook.com (10.164.192.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Thu, 31 Aug 2017 15:10:14 +0000 Date: Thu, 31 Aug 2017 20:39:56 +0530 From: Pavan Nikhilesh Bhagavatula To: Bernard Iremonger Cc: dev@dpdk.org Message-ID: <20170831150954.GA10284@PBHAGAVATULA-LT> References: <1503677438-27591-1-git-send-email-bernard.iremonger@intel.com> <1504191287-11349-2-git-send-email-bernard.iremonger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504191287-11349-2-git-send-email-bernard.iremonger@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0019.INDPRD01.PROD.OUTLOOK.COM (10.174.214.157) To MWHPR07MB3471.namprd07.prod.outlook.com (10.164.192.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1d459d6-162e-4ae1-c6de-08d4f08263c4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR07MB3471; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 3:53HD6csFvW1p7GVlM2Nw5Z6sUiWR87MqyEJQYe980rNUJ4FuuayC3rDRBfmxqnExSGCw7hj6LyyobEy7OtZjIOdY4RfS6d03yXEvy5/R2W8f+B7A+TEyiqIlahbh19L/85zkYtqHiCPI9cvt4vwQpp6n8ogofnBbnif2J/g8F0gaqooUM4lBXHW1W42Zk/+r1M2VyeRb9Q3mCHV+pUaINopXyHXGXghYwFGE7cYWvo4TDenKKDsVfRyLHaVuWAQX; 25:MSHSCa1/dqKFJw5AjZm8sY31oo3XXnGLKfrIx+GGx9geYPtg5lZtW+P7mDBecPRStxwMZtLOISVQgs1pMNHgrkmaobZpygC0TlYxQCbE/ZGP6WeJCU7hCpl9GpM5B8RNZmZe9ZuUW+jQrDZvTHeaQezitLpqBPdUzzLvoAD7DbfJWXVPD060QIBtB5rkKKOJUOgco+VjTnenD1bJcbGWmvMimeY1kMKx8qvYEux/IgPrw3ic+Drq0lX5S3TTuDsksDsgzETEsqfW5v/G0m3gyJzNUV6MkuJG53e1A4YOl77nWFFXgMKp4QpW6WILQBqCvbUarpTbc/uydDja78aBTw==; 31:czJlLNYdKHEh9VIGhHiALkZe7vmpbIr7RW0pJozawFwmtQjnYJyDhn4E/3OJjbcdOGyTfqkgz4kwoIdqWEDwS3mjnX0Q34Ko76ldyte3nBllkNPtRcfbkQEdKilCdNmekYZAhcTnA3G33FUxfugGD0aYXs/L8rGszPFEjZ8npUVPkzZv06Ywq5h4DJTw1AP4tUndi6uy25/b/PO5sn8A6/mZ0bSEex45GUXZSw1jHk0= X-MS-TrafficTypeDiagnostic: MWHPR07MB3471: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 20:macHmenfRAmZGRShUpQbqalO0SdUAI+FJitncJpZeKqb0QV+UN0I8QTHbmiZMlRYEXV779Rddevd9DRBQommGYJDFLr3Wof9L1qOwg864k/G/9D9M/XrHk726g3uRKcqg25WDkPgBuZcCAJngAtP8SFB9ccTI88uHSNrBWH7tw9TJ1a62EBHn2hk+kQEIvGiW8NqP7+kHnK8/5wKrD+1arK73Fe8PyzDA01QRa6n0Y12zD/uHpwFNOYPf6UvXydRvu3w18ufqmCxcsnLXZBXyXvutl7gkyECzXvk0k6l3ekvK+AFOjoOalOYQGusncW9TRn5KQch5xdQ444zvgOEHoZXLNXFza1mBPgsLpI0bqeRwLu4GKUkm1G30glbiDQSHTAYUoZKaqisUJFOBMkczO6AhBq7OVw1/dqRsp/MXBHTqesfdo0ZPK0Dz3SSz0lEI9MzavltMkk5pvxs5YqFTBcGWtvF0FWZzRGLLyiHvsBSmAYGk+jhmh6scWBhjc6ZuHC7blKfXwNjoRLX9xN/K7XiqXR4HHe63vV34vomc8SzMrBKEyLsPFMeE/AH2GT7K3PmqcAOk9HcpBv4JmuKdK1sdoFNQk1VIS68cdirviA=; 4:IsllcJe2NPzRJyiasSxbSMH7Ivpywgp+FqBo5ZZdmC5T4W894FDrl1UxsK3wt4/QrjY889l6rSq+vfUX0oMVzdVx93yhsb6StSvUw+KxJ5AtFTZGOnMRNUUwMCocSvMtyPCnS90iD1FxQl7dP4ZbSnll8TYItx1Xx75bYG1sJN9f740tAaFsWsas/kIcfOsA7ZfNUpYAevSVpOAgP0MiePqfU9j8oHF2Zj0opi2/VgIeVmhmg2Pr46VqGMluv5wy/wwOcQptbpAd4Z2p0ybapCigTxcRk+U58y1KcjznaFg= X-Exchange-Antispam-Report-Test: UriScan:(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)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3471; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3471; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(24454002)(199003)(189002)(6666003)(2950100002)(42882006)(6916009)(83506001)(33656002)(55016002)(6116002)(3846002)(97736004)(229853002)(53936002)(23726003)(68736007)(9686003)(4001350100001)(33716001)(5660300001)(8676002)(6496005)(81166006)(5009440100003)(81156014)(478600001)(25786009)(1076002)(189998001)(66066001)(8936002)(54356999)(76176999)(50986999)(6246003)(2906002)(72206003)(106356001)(105586002)(110136004)(7736002)(305945005)(47776003)(101416001)(42186005)(4326008)(50466002)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3471; H:PBHAGAVATULA-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; MWHPR07MB3471; 23:4FSOiPfLI/Vuhs+CAK2oDUmZTyTY4kP8FITJ6tiJr?= =?us-ascii?Q?DtWwZy7BsJkAw2sfoyxEOx1wQnapDabWkzF2ILUkGUQjrlpN/talodznooMr?= =?us-ascii?Q?KlDKQHFS570OtqtsyuuJ/AUeHsR0soNrtLDdUfot0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31SDCuzi4Sj2jStkpxDlzayT1u/mSdR+lAPW70yG6i6Fn4c0VBts71oPpuESzVhGmD1gOTO2qnFV7/FZf6aiKvo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 15:10:14.5243 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3471 Subject: Re: [dpdk-dev] [PATCH v3 1/5] librte_table: fix acl entry add and delete functions 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, 31 Aug 2017 15:10:20 -0000 On Thu, Aug 31, 2017 at 03:54:43PM +0100, Bernard Iremonger wrote: Hi Bernard, Few suggestions inline. > The rte_table_acl_entry_add() function was returning data from > acl_memory instead of acl_rule_memory. It was also returning data > from entry instead of entry_ptr. > > The rte_table_acl_entry_delete() function was returning data from > acl_memory instead of acl_rule_memory. > > Fixes: 166923eb2f78 ("table: ACL") > Cc: stable@dpdk.org > Signed-off-by: Bernard Iremonger > --- > lib/librte_table/rte_table_acl.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_table/rte_table_acl.c b/lib/librte_table/rte_table_acl.c > index 3c05e4a..e84b437 100644 > --- a/lib/librte_table/rte_table_acl.c > +++ b/lib/librte_table/rte_table_acl.c > @@ -316,8 +316,7 @@ struct rte_table_acl { > if (status == 0) { > *key_found = 1; > *entry_ptr = &acl->memory[i * acl->entry_size]; > - memcpy(*entry_ptr, entry, acl->entry_size); > - > + memcpy(entry, *entry_ptr, acl->entry_size); > return 0; > } > } > @@ -353,8 +352,8 @@ struct rte_table_acl { > rte_acl_free(acl->ctx); > acl->ctx = ctx; > *key_found = 0; > - *entry_ptr = &acl->memory[free_pos * acl->entry_size]; > - memcpy(*entry_ptr, entry, acl->entry_size); > + *entry_ptr = &acl->acl_rule_memory[free_pos * acl->entry_size]; > + memcpy(entry, *entry_ptr, acl->entry_size); > Why not use rte_memcpy instead?. > return 0; > } > @@ -435,7 +434,7 @@ struct rte_table_acl { > acl->ctx = ctx; > *key_found = 1; > if (entry != NULL) > - memcpy(entry, &acl->memory[pos * acl->entry_size], > + memcpy(entry, &acl->acl_rule_memory[pos * acl->entry_size], > acl->entry_size); > > return 0; > -- > 1.9.1 > -Pavan