From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0076.outbound.protection.outlook.com [104.47.33.76]) by dpdk.org (Postfix) with ESMTP id 42DD8324D; Tue, 23 Jan 2018 08:24:54 +0100 (CET) Received: from MWHPR03CA0015.namprd03.prod.outlook.com (10.175.133.153) by CY1PR03MB1421.namprd03.prod.outlook.com (10.163.17.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Tue, 23 Jan 2018 07:24:52 +0000 Received: from BN1AFFO11FD005.protection.gbl (2a01:111:f400:7c10::103) by MWHPR03CA0015.outlook.office365.com (2603:10b6:300:117::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.444.14 via Frontend Transport; Tue, 23 Jan 2018 07:24:52 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD005.mail.protection.outlook.com (10.58.52.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Tue, 23 Jan 2018 07:24:50 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0N6G0dv023569; Mon, 22 Jan 2018 23:16:12 -0700 From: Nipun Gupta To: CC: , , , Date: Tue, 23 Jan 2018 18:01:07 +0530 Message-ID: <1516710671-13897-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> References: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611658919587465; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(346002)(376002)(396003)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(498600001)(51416003)(86362001)(50226002)(8676002)(356003)(81166006)(81156014)(6862004)(76176011)(450100002)(26005)(68736007)(105606002)(8936002)(59450400001)(305945005)(2906002)(77096007)(4326008)(47776003)(2950100002)(104016004)(5660300001)(16586007)(6666003)(54906003)(336011)(2351001)(36756003)(53936002)(106466001)(48376002)(50466002)(97736004)(85426001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB1421; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD005; 1:ow6JHbFN1AQRLGgEeuTOzbRMS4J5SAXQ8RKWVBQ1ShaiJxeRKrQBmGhHfa/McZ7I+APXmD/2/ZQKc0H+eL/8lXdYpxBEAR11G0mBJM+MfS1vhErPc6vomJ8L2s8eQxPr MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15c7e481-3ed2-409a-4d28-08d5623264a8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB1421; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1421; 3:eR1c2PLKaCsKU+f3MtVlPjeM+QzV73rt6gBo+6qqwmzPO6FAk522H9sGPn1kOSE67DqFdIAJMEYi7kJYiaSco8BYFB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ovrlFDys54cjrhIZcDZdEfZNOMw4OU81EqXiII7MQ4LdPIMyA2uHCI8AP6xYmidbqHFFc9ay8OrQtw5qSPhHyUD6dya0Hk9yC4mrDD2zs6cjU5SR+mJzSlZxumdUy0tfhKtv1XhFOJSFPZmzld9Q0G/Pet/NiY8kZKS26if/0tetXiVUGb+MfAjfEKYvd4njRbyRpXM5d8eGu9JBC1eg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123556025)(20161123561025)(20161123565025)(20161123559100)(20161123563025)(201708071742011); SRVR:CY1PR03MB1421; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB1421; X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB1421; 23:KPlhs8zy2Ooc0N0dNfUyNWtGhcJ7M5ipIz2wcjCi9?= =?us-ascii?Q?47jzbADQWGZ56pOxvwnpeLzNw5Qip2XLCKHTQYRjKLw0NH/EMY3wZpmNRZY1?= =?us-ascii?Q?y4OU926MwuOxkcffsGKYAZl99isjPQniiAjAQfv97DLxVWFF808kFin1W83F?= =?us-ascii?Q?T1ifwfulMPpjS85PoxHEfscg96JKlnKIT7Aqy4S1UJ8kjZB4O6eSRPk7xDLG?= =?us-ascii?Q?sVFgpFoShiwxBqeU8ky1u1R+fW+r5E7wcOcL9hOBCer28pqTKMPBZlcI893X?= =?us-ascii?Q?VDXvPIW8r4+eEq9Zid+iCiDnhCX5ut/A8+YrNSkWgtkm/eBCb1rJnbwIvpcK?= =?us-ascii?Q?cN9Bp+OXZOo/FakgQ10HY9sex5fwOmxbentPWNU7yA4KRcMvS8f5V8ig12gQ?= =?us-ascii?Q?RnyyKW2yhhWqQADIWWsL0BQmOiT+6L8Q1xvVU8djaoUvHKKXtGXQnLb/VtOn?= =?us-ascii?Q?gBbFGTXmZftmcouqxoDnKY8GiupFpii7OoQsEfnQgv4+F+AjLCs0Rm8VVHCx?= =?us-ascii?Q?mxi5Q30JJWUia99epbTy/mQCB85SLxH8BoTe0sHMVnVen283m1Oy1b8QZzn7?= =?us-ascii?Q?gBGT7bpOw8bryq2SL8HQoA5QqBoSwmSLxuHT9CCRFvWmKnaie8A8eRjNqLVv?= =?us-ascii?Q?zIZJVXWBLDL4g3/R/jDsOMdEwrH2FGii7m9tG4Z3T179u6TSY8edLKzuHqSB?= =?us-ascii?Q?8dSuWOChop+H6NvKpEtDLpOYCrGhA/bb90ZlqzUP7sLk3llBqkB7FqRPf7vq?= =?us-ascii?Q?oDqBozKzgonjlyNDixE6vX9VfmLIijovBjLCU+duokDc+BKCYbXxmBNKeLGJ?= =?us-ascii?Q?wJoOAQ32n4cZEeiFadYy+/NpTxzkt/DsibuwMmvuXhQ1vn+dSMdGuMV3m8hE?= =?us-ascii?Q?r2kO075SGfHL/YiBE5646rC1dbzk77FTqq5qWtpgO5mcZdvPClLDlPCipJIk?= =?us-ascii?Q?q+hA6rjn5HKSrTq/JVDTd5mBosqFklO3WrxNm21zeZnP/Uaf2KsocGCWh06+?= =?us-ascii?Q?JzUaudYSv1AYRAeGdpmOQCWVAcJNb4rbHIx/C9PbOmY+E3excU55QupYtmMt?= =?us-ascii?Q?9hliy+ttfNKx6ygYif7ZVcye2bG07BTzN9eiywEsRl4xcOOyhsph8EFwMMRb?= =?us-ascii?Q?p7q/vJew5I=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1421; 6:TTYTDknrKKTPBjGeyrCsXIdPRs7D4IBFLPvyfqKDOb94Afz0KYJUKyYIdzZV0U7Uqdcf8d0h7lpzrK6vHLxC6JrJb+0rgwrWkYcksiJHyZDz7zLshgiONsiXBoGTATbZPEn/zodrJGWViUUUhU1cXatlT0SZJKVOPLP9j/Sez5aKP/xf7QJipt/DUDqwc6/0PQj9TyWjaF6Z107r3r0oin2bdMlVeblvpIpe3Nag5zRqv/WsZOo2Og42yIQ3CUdQif62PX+svvlz849cqyX3DuMJL+jPrJIhUJuCdBSA30meWM+w+iPOR3FiMtA8RafrvaW5B5I4SKXiNhklkAvYrt3wGWfhUP/uDGjH5VByZFI=; 5:qOK3eeAD4Ufgrhefez4O7OBUcKjfhiiBcw2hro01tzz3LWrlYJgyfCBPoteIpr34omcctU+ML0w/K9bae4CjKNx8V1aYgRudCd/zSP2os+UXY+P83YyIPfh9xAsUU+YOQOKZj4GiJI65PmGiXtyq1d8dOAPWt1U/42DGQ73TzuM=; 24:Ux9mbID+39/9hn7ZRWa5/nnZKL0WuLmCnmOGVhpgNidZXZhhUsr0axenh0fKYk8UK/HWAhAdnrUk1y7Jj6Rvtqf0s4AoyW2fw7LfLZdotBU=; 7:Ehr5sfUz1KQrlHgR169G6qyCL8StSnXcKN87fwfVdLSI2DRoE/Bw2ua9WI3pgJyx0S2g8Niv4hHPlymglyAHtUgnGWfdJAzyD6H+bscBJGEbAzO/Jv0N0HaQU+JltbP5MOagzUcgTC6orGg5QqWkUdwNPrKxOV27POwEcxcOdrGXps/zQgY665aP7vY16ovQ6UIHb809KTitCBpgD6NdWPuLcAS63zcDqAHwI2Nymrg3lN0paOLiLATbRe8Eehm+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 07:24:50.0867 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 15c7e481-3ed2-409a-4d28-08d5623264a8 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1421 Subject: [dpdk-stable] [PATCH 3/7] mempool/dpaa: fix the phy to virt optimization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 07:24:54 -0000 From: Hemant Agrawal Fixes: 83a4f267f2e3 ("mempool/dpaa: optimize phy to virt conversion") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/mempool/dpaa/dpaa_mempool.c | 9 ++++----- drivers/mempool/dpaa/dpaa_mempool.h | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c index ddc4e47..fe22519 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.c +++ b/drivers/mempool/dpaa/dpaa_mempool.c @@ -150,8 +150,8 @@ uint64_t phy = rte_mempool_virt2iova(obj_table[i]); if (unlikely(!bp_info->ptov_off)) { - /* buffers are not from multiple memzones */ - if (!(bp_info->flags & DPAA_MPOOL_MULTI_MEMZONE)) { + /* buffers are from single mem segment */ + if (bp_info->flags & DPAA_MPOOL_SINGLE_SEGMENT) { bp_info->ptov_off = (uint64_t)obj_table[i] - phy; rte_dpaa_bpid_info[bp_info->bpid].ptov_off @@ -282,9 +282,8 @@ len, total_elt_sz * mp->size); /* Detect pool area has sufficient space for elements in this memzone */ - if (len < total_elt_sz * mp->size) - /* Else, Memory will be allocated from multiple memzones */ - bp_info->flags |= DPAA_MPOOL_MULTI_MEMZONE; + if (len >= total_elt_sz * mp->size) + bp_info->flags |= DPAA_MPOOL_SINGLE_SEGMENT; return 0; } diff --git a/drivers/mempool/dpaa/dpaa_mempool.h b/drivers/mempool/dpaa/dpaa_mempool.h index 02aa513..9435dd2 100644 --- a/drivers/mempool/dpaa/dpaa_mempool.h +++ b/drivers/mempool/dpaa/dpaa_mempool.h @@ -28,8 +28,8 @@ /* Maximum release/acquire from BMAN */ #define DPAA_MBUF_MAX_ACQ_REL 8 -/* Buffers are allocated from multiple memzones i.e. non phys contiguous */ -#define DPAA_MPOOL_MULTI_MEMZONE 0x01 +/* Buffers are allocated from single mem segment i.e. phys contiguous */ +#define DPAA_MPOOL_SINGLE_SEGMENT 0x01 struct dpaa_bp_info { struct rte_mempool *mp; -- 1.9.1