From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0086.outbound.protection.outlook.com [157.56.110.86]) by dpdk.org (Postfix) with ESMTP id 06C432617 for ; Thu, 30 Jun 2016 14:17:08 +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=GNZue2koFY8efjD+oVRpVgIokN2ofaDEOFX1NvhHTig=; b=Et3RBOIrjFV/ihiDUs3JrmqbUkzMCe2PPuTWrKDngHe7BSc/LctXtO0bsXIC1YxVpxme6I6W0YOStCTScsSNZMF5/v+5x0IM7U7zxKIC1MKmFR4g6DidndFBg+QDsuX0+FJRL08x6YzDj14EwxyRGwlGRIYySBfsSo7okMQ1Jz4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (122.167.11.22) by BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) with Microsoft SMTP Server (TLS) id 15.1.528.16; Thu, 30 Jun 2016 12:17:04 +0000 From: Jerin Jacob To: CC: , , Jerin Jacob Date: Thu, 30 Jun 2016 17:46:36 +0530 Message-ID: <1467288996-6109-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464250025-9191-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1464250025-9191-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.11.22] X-ClientProxiedBy: MAXPR01CA0009.INDPRD01.PROD.OUTLOOK.COM (10.164.147.16) To BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) X-MS-Office365-Filtering-Correlation-Id: ac30ab51-ff81-43a9-1a23-08d3a0e07362 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 2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kErkzn21nxQBdjgbdV/ZIc7l7GimaTLha1mcJ9uOmIFopneJ7b2FCfgtggUBbJHwePj8YnG8ELpym9/Fa/K5byu36Yl1bouo2pq9CscLDuj2CrNkovNM+ShdlYK+EMJ9DRlZa/Kz5EWxi9z/OCzbRkiS1bGLgG+5TmrcgYE9SIwGP2Ca6YX5KuDtEo8pTJ3N3LxIb0ABmY9Twu0ZzLLlAg/Icx5z3ROCmuMHSH41/bvBuwBoar7BwW3E7wUVXQ+oFfhZPgC8JXZedJ06KCWkjvJOKSI9C0nNDghvfdYjHw882eLiLYH9xzDN3fHzkj5x5YEV3jRNDHzSiE01zX+qwIE59UxFnzmflBXQmUGUKuqnZnZnczWlKAHc1Pt84U1DQ+JefExaytoy7itaZ1FzvCYalwb1YhFZ33IP/cDXtGH2O1sDwiAG2G4XbXWkjw/j9MRRb+EpW6PmJ5XPhojEOxATTZjusIx0pcXS/eepoVkoJvtzuyd8tI6AOFcHR6nVfRot4ZkHarXdimXM7XSq9ydf6HcaWp3lxG61gy3YVHNNaiiJssq2ITY91qFe72AojRy/+UQPRfBxZrzP5zkKVvXLcPaePv0kYZKA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1717; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 4:mjR2fG5MK8aYHL9erH2rTUjoZ8/tXBjvXXgWLzDU9p1/uLrZJquiKHFOs/ZcHCQ94W3meENzs/3MuGowmoml4ZgxYK+IxugKYRWKGKizilapSd/e62bdOwP8OCFdMGe2lcfhvxgqf/ggNxz3kmLYn85bHRbnci+aLSxFoYDz3OakXSA6o6mFpJjVjYXX57b3e9CfN6Z3KtQnB0aAo4Sgpw3MoRrS+hfkAnKsXJBVyZZmuvA8XncpNOc7Ls3Z5OX+jD6NQ53KvoMdbFlgH23QS5rYl4UjXrNO+obdOPll2UAi7KIZj2+zjsvZD4jvzcKQwojOG1V31NN/z+R+E8sU/YPF8C1t1MFeu1Po8HPopFe9uVS3MUm/9MSClhLkTWGrKB+RHXQx11an9YPzopd9PYlVQyfeKan7gABdh9JnU04EGMeBUuxazFVwPfxv84S+ X-Forefront-PRVS: 0989A7979C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(81166006)(2950100001)(77096005)(97736004)(81156014)(92566002)(101416001)(4001430100002)(48376002)(8676002)(36756003)(586003)(47776003)(66066001)(305945005)(110136002)(33646002)(189998001)(19580395003)(50226002)(68736007)(107886002)(42186005)(7846002)(19580405001)(7736002)(2351001)(6116002)(2906002)(106356001)(229853001)(3846002)(105586002)(50466002)(4326007)(5003940100001)(76176999)(50986999)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1717; H:localhost.localdomain.localdomain; 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; BN3PR0701MB1717; 23:MC0JEhwXc6o0qSxt/7uR7wgmYDYnflH/FbsCYbZ?= =?us-ascii?Q?HsQCluRJmhUUg5vbvGWkYEtfzW8aqt0C6IB+/NKlAf5IZE8AuFOevKQwUipd?= =?us-ascii?Q?FSesn9xPfJ76Bu5ubXTu0dcgMP8DJ4CPFqFNpx6u+jcQg3p6kewrxAhBCmtj?= =?us-ascii?Q?1lCVM8pA06ajsuFctttjrzueWjYyxs4t/xzsTRfNVaujZh2YU/WPMSr82s7T?= =?us-ascii?Q?oi8cvIXu64syAHI0g7DYItcBLwXu6jwbiETQIMqjIN3ztCRx9g4Qjv8Q9eCu?= =?us-ascii?Q?ng+vEDuAgzrnQU5BH49RwtdIIc+P9gCw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; 6:TqkNx4DtX+XBomLtpEYLrInE3+ZXPFLy2lVPkmS/ibj93NHINIBqD1nOsMqZpzV5dbrMkvJVr6ksR0eN41dnsK7qtQHmyaUy7xVyP0xuIwDFusNtpVyMWZ2aDNKifaDCyglppQKe8Bfq8koKyU+Y9gO2uULvbHX0B9JAZy+WCXhGwY2LkOge4SRY7YlKOoEkZDDGE7oQoTdNOrWVJUQr5nw9hJSniX2PW6a8TKKBXt3IEZXp4lS5LgMRA6elqGELuK+QAJLXO+L6vHmOQKvDThY/y/AeSZV08wW4QCmRK4o=; 5:Qo7PFpyHOQ20zXO03ry1eC+/iwoOzAYAqdTZ4sS7D0/ECACpmec3q9P0+i2SW7+3XVTTN8sdAOFAz2/Z9AzXqfBdxnFlmissEurJfAnjiC9IRb7aznJNx/gZXqCYepA/eYHqqIPjJuYVaQTk83BGOA==; 24:73OKQxni8g71XhK1dshYVY6CKR2llCpi95QsKgZJ+/pIzdw8eF6RDBe0kOlVb5KMGNqYAzg9fonh8iYyfAfqKjM+UdcdNOxUG/Cdr07Nro0=; 7:Ek30P6zFjqM6pYEpLurZ2aKUQN5UerTRJHd8fljyGbpJlpbetyNq6OAayvyZmsuV74HRBpjHoigAIAWlzn9SCaMmDDUAOPAtm6zfq1l41Rwbkhkhh8ugx+plpWOrKVFvvPURs/O04vBMSK6EpaQ5o6Mttks/xeVP/9S0YR67RANaMnmsemLNcGTaDC2TqAR9VTv4b7IaxAtyGbR0PVh4aR8B1bY2gFAV5laONocTdSecNh+YUUFaUcwY5hy+4xBA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2016 12:17:04.1315 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1717 Subject: [dpdk-dev] [PATCH v3] mempool: replace c memcpy code semantics with optimized rte_memcpy 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: Thu, 30 Jun 2016 12:17:08 -0000 Signed-off-by: Jerin Jacob Acked-by: Olivier Matz --- v1..v2 Corrected the the git commit message(s/mbuf/mempool/g) v2..v3 re-base to master --- --- lib/librte_mempool/rte_mempool.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index b2a5197..c8a81e2 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -74,6 +74,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -1028,7 +1029,6 @@ static inline void __attribute__((always_inline)) __mempool_generic_put(struct rte_mempool *mp, void * const *obj_table, unsigned n, struct rte_mempool_cache *cache, int flags) { - uint32_t index; void **cache_objs; /* increment stat now, adding in mempool always success */ @@ -1052,8 +1052,7 @@ __mempool_generic_put(struct rte_mempool *mp, void * const *obj_table, */ /* Add elements back into the cache */ - for (index = 0; index < n; ++index, obj_table++) - cache_objs[index] = *obj_table; + rte_memcpy(&cache_objs[0], obj_table, sizeof(void *) * n); cache->len += n; -- 2.5.5