From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0064.outbound.protection.outlook.com [104.47.42.64]) by dpdk.org (Postfix) with ESMTP id A82532C5 for ; Sun, 19 Aug 2018 09:00:19 +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:X-MS-Exchange-SenderADCheck; bh=FFU3AiC+/2mjEQoWtiJbwyoour32dO16zXyYzosmFpc=; b=CDJxWA2zy1o2MfLtQlewZZ17x5rM4pqSyU+3zWQSLDpFX1q3eFURH9mJ6nkJWhwkI4Dg3aGnzQZlj20RBtE1lu250BqYNjr05hr2PANEaRFTuw06idrnisrbJK8e3dNNzoXVSKZdkrRxSRN653GFEC9lnzSbPFNU3OIkcdA6+c0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.200.237.61) by DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.23; Sun, 19 Aug 2018 06:56:23 +0000 Date: Sun, 19 Aug 2018 12:26:07 +0530 From: Jerin Jacob To: Qi Zhang Cc: dev@dpdk.org, magnus.karlsson@intel.com, bjorn.topel@intel.com, jingjing.wu@intel.com, xiaoyun.li@intel.com, ferruh.yigit@intel.com Message-ID: <20180819065606.GA2655@jerin> References: <20180816144321.17719-1-qi.z.zhang@intel.com> <20180816144321.17719-4-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180816144321.17719-4-qi.z.zhang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [106.200.237.61] X-ClientProxiedBy: SG2PR03CA0088.apcprd03.prod.outlook.com (2603:1096:4:7c::16) To DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 490a152b-a493-4d18-2828-08d605a0e212 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5002; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 3:0kVA16MwFsKXFAL3NYqsWSk0/WGMxLb+srUSqumD7RkTV6v9cMKaILNIa+qEpHWXd2RJ86l/Pb6hF5V/dkRo2yk7OC0M2czPO0d1JALPZsngMn5nQs+XO63DqrwGvypDAZKYI4pd8NA0vzbpFcYJ/+NeYw/grULTxyiUgeNRwdxC3LddoKBbFpHlZ3cBMeyUKj/Fx+sN6hi3IPOvjawFGS+mGesEaMbUTXGV5QqwBvOuMF5sEfqtozQPlTAA++tJ; 25:K9gyZv2CYp/o/fpXLjKMYRuaigCm2h7R36sCLCyjkCRibFNUi+SmecFk279aH+go54frIcdVA4l5WPm5Sl3gAhg3GVKp681c6QEI8Gb1w41JbvdTS6LcJ+wV1NXQYhOeGECH6kKV6DfH0Z15qITydsOQU17WHsarOHkiT6KlXvfdoVE8+CrjwcXcebUXc1S+GGTINM2QHucljRcC/hQtVe0HMCQ+Nkv8fA7TmFKC9SOgkntoTFVACwRiE1+1AQQUOxN9h92x66OA6ePFWpe0D8O1rRzleLl4KrYGfMV66RadXsGk5Ou27ORX1EkJKucNSxnzX+z67HMO9d4Q5wM+pQ==; 31:C1nxsC4xlWKXZV3FmH8F9sg/EbHxCOjTLRxPZA10Yaw4fPJheTW/IFMr/gsjVUyot/9KvPlmaVAim7qG6WeoFqwM2blrSdPq0SE+9a/5R70p8iSTPn+ATl3bF4MsXhrcI5xXhjGA5FynnI6PCypDZOpWynFKePLISDeKqTDspqg6DU4OnUqo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oft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:DM6PR07MB5002; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5002; X-Forefront-PRVS: 07697999E6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(346002)(366004)(136003)(376002)(13464003)(199004)(189003)(6246003)(42882007)(4326008)(25786009)(50466002)(8676002)(33896004)(81156014)(81166006)(33716001)(305945005)(7736002)(386003)(16586007)(8936002)(58126008)(186003)(316002)(16526019)(26005)(105586002)(6496006)(76176011)(33656002)(52116002)(106356001)(3846002)(47776003)(6116002)(66066001)(5660300001)(55016002)(6666003)(229853002)(5009440100003)(2906002)(68736007)(23726003)(956004)(11346002)(9686003)(476003)(486006)(72206003)(478600001)(44832011)(53936002)(6916009)(446003)(97736004)(1076002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5002; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB5002; 23:YwnTtTit92n7bSo0Hy2+v34GXk+jBlGNDNbUtyKiW?= =?us-ascii?Q?0LBqhLUUZD0sMPqCTSq5UmN9QqOEgYKUs9pwz3+EqbKlO2GDuF7LcJYxAtiX?= =?us-ascii?Q?QiP51BoQFdcG+UewYuudSRpJ8sZwsAXDsA+Rfc9hxE2qPJrjraTvMMTqeTKv?= =?us-ascii?Q?SID9ytNSHM6dPJxtXj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aaDX3Ro?= =?us-ascii?Q?XI3X9ZKO6aO64VQJzAyfuReDrCAI378ewcViZqcunEhTm0urOtXYPQjiaVH9?= =?us-ascii?Q?xEAvLp0U+I9Pr7eUY/fGA9d2uDgqfkAoysTQ83nyvqmml0U7ZP0iSuQlKLpD?= =?us-ascii?Q?uETHqt56QZD7LkrMqNM5lAqQoQe85ItOx0uFIS4oiqcWTzyN4BXgyZTDwnt/?= =?us-ascii?Q?Ur4lUY2q0hDxTgeXJoMeAhA1fpIc62EF1GxfjOQxp3FtRzAu/0cDI70A/EjV?= =?us-ascii?Q?Fry13Tud6R7oPtWY3LHdVWTLry+sFpnYhzbS2QTJkaT/piYpVyJbXQ0eO5He?= =?us-ascii?Q?RhcnA=3D=3D?= X-Microsoft-Antispam-Message-Info: 6/i4OU7H7t2KHYx3FT7OefD99qTgmZk7Sys60OESvYI+XAWshilt0rrfxvcP+/NYxn4/e7REJIV037hpT7lWdnppJNZW7/I4VFMvpjl5NFB9v063Uhm9MBmip1ZkkhnHtO7dPnp/sliWsipvjShcflwUyFOHFdomQSagrsuz6o/WwqN5s2p8nqPGq+g5VVN6vIuULEDywe6CzJk9gYA+cIpXGrg3m8BkxBAXLjcJ39jdmb0RcSrvXyvzMKy8Do/Lf7skCg3/gU8/hCXgtEdnOsdV1JbGGV8fU3nk3gvHJwWdV2R9ARv3Kil7NrfA5hSDPKOlZFtwnvob2MSiET06WTleafFPYzYOQaU+2Un5TBg= X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 6:TJYOtWobcOfLu05aIUfHQL5RCHYZdirK3LtJGwx47h8Vye7tt3Emk2KK7HgqmGVdj7lxs9sih+GvasI3v3dW6VgySviSXxNHLJTDrQtxGzY3XJJfffv6YojYdLSSCGR0lhw0KbJlNw2hS1oY+Hy4bkZtUisWWIJU+cX00Wza4SDh3JnP38ogZ76vW78pitVPeqeFkHNtWOQ2hNoMNU4wSzDx7vv0arPvmELgMWSgoZCktdo4yUEm5QKcsP/KMNk4uDJ8oWjHsz99zBOpXxYRi+CZMybiEjqlXm9I+haCU+eMfKB6M4+wATZPuNyMh/xFHPzsqDy5NHCl0vg54ub3r6ugKQu1tA3tJKZWxa8G9yI3ArtNzs5V+zLrJZPQCxVQJknH+WMrXPWbW0knoa7m9w/QE8ZW4svU6nDh9VTuSVu+9Suz0eseLQbT0DHXEl+LEzKfmmPfOrg4Y/gxMePepQ==; 5:UHU21xXEqK2AVq1uqfiOFGi809l6OeBshvMknEUVBy5LL5uoz1P8p5kxUczx+9mZ1oNEYlXrcCD5mxj/PR7EH0qXA5Yeh805OHCXixJXu7TmFN+RaxoWlBQUa1pDeY1pHHWQfWkBgvkv183Ddp4BsPrRmtcj/vuskZg/w1u0Afo=; 7:EuPsIa4O2GlGk8b97k/eDj3x+kVMwJXdRpskG99tZ6ci6/oBpVV/Rsy9ILfz8gTtDLQ/BmNKTIGo+wCk7lz/Ut5ziaxeAclejCYvu7tnP42ns/B1IKGRdjM/+9iQkRCbNKgLF1TF2CddjL688y3Uxu9+hSysrM76KWvmydbtKBVS1b+bTrdlyAwgz5uGiKtP70/VuO0VdZttPGTJjq7TgLZ2CUnoQPdMnBsz5iWz8C8GzmrhjVRRrBwXImxnd5VK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2018 06:56:23.6980 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 490a152b-a493-4d18-2828-08d605a0e212 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5002 Subject: Re: [dpdk-dev] [RFC v3 3/6] lib/mempool: allow page size aligned mempool 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: Sun, 19 Aug 2018 07:00:20 -0000 -----Original Message----- > Date: Thu, 16 Aug 2018 22:43:18 +0800 > From: Qi Zhang > To: dev@dpdk.org > CC: magnus.karlsson@intel.com, bjorn.topel@intel.com, > jingjing.wu@intel.com, xiaoyun.li@intel.com, ferruh.yigit@intel.com, Qi > Zhang > Subject: [dpdk-dev] [RFC v3 3/6] lib/mempool: allow page size aligned > mempool > X-Mailer: git-send-email 2.13.6 > > > Allow create a mempool with page size aligned base address. If I understand it correctly, you are doing this enable AF_XDP PMD which has some constraints. If so, I think more transparent way to handle this from application perspective would be to 1) add new mempool ops which based this new flags and 2) and call rte_mbuf_set_platform_mempool_ops("new mempool op for af_xdp"); on af_xdp device probe() That will avoid the need for new API and testpmd changes for flag selection. The proposed RFC has problem where, end user needs to know what flags are relevant for certain PMD. > > Signed-off-by: Qi Zhang > --- > lib/librte_mempool/rte_mempool.c | 3 +++ > lib/librte_mempool/rte_mempool.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c > index 03e6b5f73..61f7764c5 100644 > --- a/lib/librte_mempool/rte_mempool.c > +++ b/lib/librte_mempool/rte_mempool.c > @@ -508,6 +508,9 @@ rte_mempool_populate_default(struct rte_mempool *mp) > if (try_contig) > flags |= RTE_MEMZONE_IOVA_CONTIG; > > + if (mp->flags & MEMPOOL_F_PAGE_ALIGN) > + align = getpagesize(); > + > mz = rte_memzone_reserve_aligned(mz_name, mem_size, > mp->socket_id, flags, align); > > diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h > index 7c9cd9a2f..75553b36f 100644 > --- a/lib/librte_mempool/rte_mempool.h > +++ b/lib/librte_mempool/rte_mempool.h > @@ -264,6 +264,7 @@ struct rte_mempool { > #define MEMPOOL_F_POOL_CREATED 0x0010 /**< Internal: pool is created. */ > #define MEMPOOL_F_NO_IOVA_CONTIG 0x0020 /**< Don't need IOVA contiguous objs. */ > #define MEMPOOL_F_NO_PHYS_CONTIG MEMPOOL_F_NO_IOVA_CONTIG /* deprecated */ > +#define MEMPOOL_F_PAGE_ALIGN 0x0040 /**< Chunk's base address is page aligned */ > > /** > * @internal When debug is enabled, store some statistics. > -- > 2.13.6 >