From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: [PATCH 0/4] Infrastructure to support octeontx HW mempool manager Date: Wed, 21 Jun 2017 17:32:44 +0000 Message-ID: <20170621173248.1313-1-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: thomas@monjalon.net, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, Santosh Shukla To: olivier.matz@6wind.com, dev@dpdk.org Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0083.outbound.protection.outlook.com [104.47.36.83]) by dpdk.org (Postfix) with ESMTP id E537A3252 for ; Wed, 21 Jun 2017 19:33:43 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In order to support octeontx HW mempool manager, the common mempool layer must meet below condition. - buffer start address should be block size aligned. - buffers must have the physically contiguous address within the pool. And right now mempool doesn't support both. Patchset adds infrastrucure to support both condition in a _generic_ way. Proposed solution won't effect existing mempool drivers or its functionality. Summary: Introducing capability flag. Now mempool drivers can advertise their capabilities to common mempool layer(at the pool creation time). Handlers are introduced in order to support capability flag. Flags: * MEMPOOL_F_POOL_CONTIG - If flag is set then Detect whether the buffer has the physically contiguous address with in a hugepage. * MEMPOOL_F_POOL_BLK_SZ_ALIGNED - If flag is set then make sure that buffer addresses are block size aligned. API: Two handles are introduced: * rte_mempool_ops_get_hw_cap - advertise HW mempool manager capability. * rte_mempool_ops_update_range - Update pa/va start and end address range to HW mempool manager. Testing: * Tested for x86_64 for rte_ring and stack. * Tested for Octeontx HW mempool block. Checkpatch status: * Noticed false positive checkpatch warning: WARNING: line over 80 characters #30: FILE: lib/librte_mempool/rte_mempool.c:374: + RTE_LOG(ERR, MEMPOOL, "nb_mbufs not fitting in one hugepage,..exit\n"); WARNING: line over 80 characters #46: FILE: lib/librte_mempool/rte_mempool.h:269: +#define MEMPOOL_F_POOL_CONTIG 0x0040 /**< Detect physcially contiguous objs */ total: 0 errors, 2 warnings, 21 lines checked Thanks. Santosh Shukla (4): mempool: get the external mempool capability mempool: detect physical contiguous object in pool mempool: introduce block size align flag mempool: update range info to pool lib/librte_mempool/rte_mempool.c | 34 ++++++++++++++++++++-- lib/librte_mempool/rte_mempool.h | 46 ++++++++++++++++++++++++++++++ lib/librte_mempool/rte_mempool_ops.c | 27 ++++++++++++++++++ lib/librte_mempool/rte_mempool_version.map | 8 ++++++ 4 files changed, 112 insertions(+), 3 deletions(-) -- 2.13.0