From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0067.outbound.protection.outlook.com [104.47.36.67]) by dpdk.org (Postfix) with ESMTP id E1DCB1B1B3; Tue, 23 Jan 2018 14:03:26 +0100 (CET) Received: from BN6PR03CA0016.namprd03.prod.outlook.com (10.168.230.154) by BN3PR03MB1414.namprd03.prod.outlook.com (10.163.34.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Tue, 23 Jan 2018 13:03:25 +0000 Received: from BL2FFO11FD005.protection.gbl (2a01:111:f400:7c09::193) by BN6PR03CA0016.outlook.office365.com (2603:10b6:404:23::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Tue, 23 Jan 2018 13:03:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD005.mail.protection.outlook.com (10.173.161.1) 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 13:03:19 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0NCR9X2020973; Tue, 23 Jan 2018 05:27:23 -0700 From: Nipun Gupta To: CC: , , , Date: Tue, 23 Jan 2018 17:57:03 +0530 Message-ID: <1516710427-22843-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com> References: <1516710671-13897-1-git-send-email-nipun.gupta@nxp.com> <1516710427-22843-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611861993757072; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(396003)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(2351001)(106466001)(6862004)(97736004)(2950100002)(5660300001)(450100002)(4326008)(356003)(104016004)(305945005)(26005)(76176011)(59450400001)(316002)(16586007)(54906003)(47776003)(69596002)(36756003)(51416003)(53936002)(105606002)(48376002)(50466002)(498600001)(2906002)(68736007)(6666003)(77096007)(81166006)(8936002)(8676002)(86362001)(336011)(85426001)(81156014)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB1414; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD005; 1:zSYv39uraHV+xWEP72wMRs/G2CUlA/sADWf4TlP0ZXhndmInmevI/yB/2gaX1Wxh7jTxJd8EMpz33sI7SbjRr9SgHtSsPNkn7L4j9LF3alCcNicj5+c9xYdyFwz7O20I MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8c2e3c6-aa9a-4976-9990-08d56261acd4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB1414; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB1414; 3:DSeXEOJ35SKxjqs680vSwhQjqOc6RwsNhNrDar4uzlGqR/O6YwY2H7fypyZi5/NpoXP3goUh6t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oi63GliJayMS5iT+M++I7yCmnfxkcedLXFQMCS6BnIf+IAyq2N+fxkpmt2DC8uLsl5/KJffZDonTFAiL0eBsyxxIBrIwljuqZcpfcTYwzrGu0b6I5EOTXc/WgzJ3r75vGTcYt7EVy1OMUinFDEz5s9y7ZKXtu8UoM3Or5O3eT0AC6MA1Q6R1TDWcweBT6rqWNXqQ1OuMiU3vIVjb61A1LkKVpOUY94af4m6EZVQxpw= 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)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123561025)(20161123565025)(20161123563025)(201708071742011); SRVR:BN3PR03MB1414; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB1414; X-Forefront-PRVS: 05610E64EE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB1414; 23:UmxJkR9oLoFH/T0DBpskRS/+qZMZ6hFhqZf399dHd?= =?us-ascii?Q?ydaAgVfjrgzJpnJFecaXnsUk+Z/Jvu0u/l5tqyLKwc0oYqOVcXttIYmf+27Y?= =?us-ascii?Q?pr1qDKinTHuI++FRT/eeg7l7nD+/+P2I/qTgA44AmAtqnuvnykfcUqRj+gLC?= =?us-ascii?Q?n9Y/661psoKR4RjAngNQKkgjMQ2sxkdKY1m1YUnZMsm9lGIo0PBNPYFZ7+J4?= =?us-ascii?Q?k0Tn7pPH6Et/oBD7LcxCB/vxGZz8VQY/TyY1iNEdaAzwmcwf9qNKmI1MKFav?= =?us-ascii?Q?dBqUs9nx/frlHBuxe56wvjyPwjbsTvS/9qmqtHkP4quBfeoOZODSy+T7rk6D?= =?us-ascii?Q?tTmFGKeCk8pgwfUwZQg1Nya8iga//5k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6JVqQMgPNTa6Cq12bGa5hFtgEM5qj7mPKVhsMdvvvWxJKNcLeN08rzn6ZrO0RGvXE7W6XDb0cACxLX+5DpwUondp9O/uCJ877IBP2gStuxTglD8HKLxeMkCz/3mbPvC2FdJbamrcrejfNm5x5cz6usknIBch+uSnGGRu7OqRVuMTm4pmuksrCe6/+YbDfqMkfXXAvw7UQpYia1tH6p9t/f4DP2PgWwjjZ9dX3KI/OBiKn4kOShrT886SxaEeZ6uTov3Nkxm/torv7WYOTo9yvO+HEtqW7UG7OXg=; 5:A4Uss54FHLXLuRdvsK/Cs19G5SsAIYPb55QA6RcvGe8TAjwzo8TvHwyHfe/AAoQ7jDS91fRS4hAjWoB72xLDdABgbZsH64ADUOpAe0OrdGLNWdjk2WU2rY2FQp4yRR7XEbq8IzUnZz3auQD3po00tz/jKKbxNz982vX78dvq+dc=; 24:g7wA1zxkU8BJS05B8DUWs+TPCnV6FOyb7Jq1LTkOnQk4BmftInYAFg/PRbCA67YSXuXCaIHZNa1TsFU/KiR5nfKVRfWAcC1ULDOL4Vv2kHE=; 7:UxSLmrPNUKSdcP+tMK1FNZxdP+Hi0qZrnmhcLwaRXq/8NN0duHGb0bYCKYl3kJXLmh4lyoqeHanu4FgcBzWzjTfIQF+RN7tL+SMCcsWPGx/fSKDBVMRmYhwCWoPPmpeLH1l5eAutlouyZlU7HtuIYiRHuyLsOE8/26wjJTdPSA0aqW2hLI/y8QnQmDs4D0XCaezi3UEsGwVwP+7PR0FAUaMqLWgnqQ2zD3X1dYYRl/aunhqGfHaltG1BZIGGl+Ll SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2018 13:03:19.1573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8c2e3c6-aa9a-4976-9990-08d56261acd4 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1414 Subject: [dpdk-stable] [PATCH 3/7 v2] 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 13:03:27 -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