From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0087.outbound.protection.outlook.com [157.56.110.87]) by dpdk.org (Postfix) with ESMTP id AFA5B2B88 for ; Thu, 26 May 2016 10:07:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=drNi3KraWSXCFWU/48QnYGvRL+//2N3Yf4PxI4Z0nLs=; b=NKjKZQo2zPz6bO5pblY35tIJW7EpCvbfvIpklL/WxRQlbYZVYcnrevwQJT8B5zSBol2ITynIm1ZKCJQUE/1NOLLgAsy7rTDG5rpJ6AHTBiDankl+GGC6srIQ60U8SyQxm4HXDSAOYraEYA0hgX6NrQfpeKvadxYqb99vgFindz0= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (111.93.218.67) by BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) with Microsoft SMTP Server (TLS) id 15.1.501.7; Thu, 26 May 2016 08:07:32 +0000 From: Jerin Jacob To: CC: , , , , Jerin Jacob Date: Thu, 26 May 2016 13:37:05 +0530 Message-ID: <1464250025-9191-1-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464101442-10501-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1464101442-10501-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MAXPR01CA0053.INDPRD01.PROD.OUTLOOK.COM (10.164.146.153) To BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) X-MS-Office365-Filtering-Correlation-Id: 72842b1f-5d0f-4157-03ed-08d3853ccb99 X-Microsoft-Exchange-Diagnostics: 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8JMiogTDvSHYzYApYZO0mt2EBfbpiCQzP4H5DHIDGRNzkLAb/YjophFIEl6oSMn2Yijh1Rfe8eTaoVEtz+onOgoEoaqjS60QDSGLWWEJ43T6j7I6/6blrSSmJfMAMul96ikzFGdOPWRwNRnQS7iVMmRokl94UHXkffUJkHa10qRckZdQ3YYyuf6AErtU6qjSwDSVkOghAY8/ZepQw86DbfNCoayuHaBOHs9LmaKh7j4V7np81AMc9Gb6IrC/DlhoVFtYQQcdJuA4Be4oHD9OpCz+6TxEygaGEM4X+x6hx0NQ2JvuyTk41S8ZhEoRxzJbcgE8nvZAxqo/3ViSjzGqdL9+6rnaI5FTG1HX0qNBhKAyIASaZrd+fcrybdUk3op8h1uY+4eMe0hw/O/eEAddTnZZyMeCB8fXU4+0Cqc= 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)(8121501046)(5005006)(10201501046)(3002001); SRVR:BY1PR0701MB1724; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1724; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 4:Y8LtS8noG6DdyL/q89rI7YyoIWjRmcfy6QOHA1Ya8ZqgwQCNTFub1I7KWU4Xm6XcFWJ3TFdXCyV2HYGYrvu81DUiBNWBOY3Js0Imi6G4VkT84TbBtD03SAcDyaowJ5nborp5SEkerCPsI+BOloMWy4QzUl65NNS4pAfeplNgqg+fvgGR1QqgReIGDbUH78pdur2R4yAQTgB+RMpmJd2YDr/9gE5bncCXt1pPPOhVq/YnYYc3MREENRK5l3uawrIOZOHXRRRJXTtzkYKUsDgJsjzfCM5aGttnh0mTokDsgttIL1K3CDne5DUqSzcs36qpxUWnnl58duD2AmD3VbtHoGQZ2eOmOdiqk6Y7QhzReenm0KkfzBdWCq75DuYGl4/Fv9hE7qwKSdAI5NFkumaCSFe29g3rKYL8LejoCTw+PKJWcPsK7ZapFoha7i9AFgVA X-Forefront-PRVS: 0954EE4910 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(5009440100003)(50466002)(5003940100001)(53416004)(8676002)(76176999)(50986999)(4001430100002)(2906002)(48376002)(5004730100002)(42186005)(66066001)(36756003)(81166006)(76506005)(4326007)(47776003)(33646002)(189998001)(110136002)(5008740100001)(107886002)(3846002)(50226002)(2950100001)(6116002)(586003)(2351001)(229853001)(19580405001)(92566002)(77096005)(19580395003)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1724; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1724; 23:adU/Un6yCyKIAeQ+K57DXFVh321ZqcWXDZybJaG?= =?us-ascii?Q?+BglIKHC1KPwsJrY97OMMUky8txCGOM+onoYBr1alvYrZ+atfIdt7fqZDo3m?= =?us-ascii?Q?Z5dCbktDe8c5Wyz19qSFTQXpuXE78ZEHxupsMQeZZ7ArAUQPeZs+F1yzZFHo?= =?us-ascii?Q?J6dLAkEv581YeOL5IZfivtmJXbGUbQnkQtxU8SFSi5FMmX7zkgvVm/JzeigO?= =?us-ascii?Q?lpuIx2fMU8L/S4EXl1HLnrOVPl4ty8DomlYBuvlvwqny+Y8+N7o4mDh6NHqq?= =?us-ascii?Q?KW2O8pFtvlJwdnmbF7UAbL6dXGC7BGaYLydtoZIXdYtf2Nr4gxLvJw7xZ68g?= =?us-ascii?Q?StwvgkjVYo+4qRiRWRcywo/NFSmXAd4oVZYyahc8DzS2FcW9GXaOvq6+NeDN?= =?us-ascii?Q?Exbuu351ZgNDrbjWDXl7RrNaCkNaJ5ooZ+FRPPwN85HwBVuB2ePJECi7QeBL?= =?us-ascii?Q?0woaEDVBPpudg5J+uhA+MObSvJ2knnI9nD5CBl7D6mNqFlKQ5KqVH73LlLWE?= =?us-ascii?Q?hQSXf2OXfW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Xs4Y9LMB3/ZWBLLnwg9eNhInrDnAompE4fiG6VKm4+2edWdZO SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2016 08:07:32.1893 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1724 Subject: [dpdk-dev] [PATCH v2] 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, 26 May 2016 08:07:37 -0000 Signed-off-by: Jerin Jacob --- v1..v2 Corrected the the git commit message(s/mbuf/mempool/g) --- 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 60339bd..24876a2 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -73,6 +73,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -739,7 +740,6 @@ __mempool_put_bulk(struct rte_mempool *mp, void * const *obj_table, unsigned n, int is_mp) { struct rte_mempool_cache *cache; - uint32_t index; void **cache_objs; unsigned lcore_id = rte_lcore_id(); uint32_t cache_size = mp->cache_size; @@ -768,8 +768,7 @@ __mempool_put_bulk(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