From patchwork Mon Apr 9 10:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133011 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp108775ljb; Mon, 9 Apr 2018 03:25:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ppJRxINnHq97mrM23dA6MY0nImyzRp5EOIiG/c8Aorpaay2Z7UUFO5sKuSPw1uSV7gMGp X-Received: by 10.223.188.135 with SMTP id g7mr27658201wrh.69.1523269553101; Mon, 09 Apr 2018 03:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269553; cv=none; d=google.com; s=arc-20160816; b=ymDpYWMZmrNXwDpTkGPxKokjlE1ZEBems7/JIR9oCTnom1DFH7FVqePYiEXYTKWh1c 8eqTj0yjbuUheSRY/fOpYMZ9LrQITRI155TX2pHzo0tTW3qm1FLwCwIgyFy/LB3fV7Qb aLchntEDtv8hVmOuTIXThZzboLZ34ie4cKyXkmvJsEEtLyStflm2pm2/3/P0mjDbeu5a esyiEixlbl+VzNkJtebWXTOvzDbCVYbALGbzA22db6XplztYMV08reidku6x65Qsg+OL 8MgKyJ41fQoQKzq+a+lhR1N9wszHv7gW/Hq5ZrOywaZOu+6pBDtI+R57tORiFp2vwTXF /uyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=qk+ZMbwELtwuxBZtYuJ2Fy6g0MYTZQih/wf/Qzx32hI=; b=CxZFFuJ/bWBonOZsS+AZJRAKZJ6stoMVzfELhcyXRQj8j9ISPY10vkKrwbFv2n6vDB /ZgdmFskdt2SDzd0ijs+lSVlhwFCACmmyNmBGeX0M6YXQXDpJ3JDu9T2TdaoaUFd3KO0 xO2vSOzsQJQZsAnHhz6nfiIL4YVM6O4hH9IrKKNGdc4saq8+gYsAqi83g6Sc7VAWIjtG 9jN/wk2wX3QLt7IS1Va6lwUwJnRZXgzIw10SqfDourK/AhFDL38Xxf9I6fDo8SdXYRwt yrijqhB730HmWSaI1oYxXkiJQr3KlsHRo4afX2fAY/JRSXVR6ktGW0AV7Ajq2zyW7A4t 7s9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=hJCU/k4c; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id b65si211764wmd.186.2018.04.09.03.25.52; Mon, 09 Apr 2018 03:25:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=hJCU/k4c; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6F241B7BA; Mon, 9 Apr 2018 12:25:52 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0067.outbound.protection.outlook.com [104.47.1.67]) by dpdk.org (Postfix) with ESMTP id 61E1E1B781; Mon, 9 Apr 2018 12:25:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qk+ZMbwELtwuxBZtYuJ2Fy6g0MYTZQih/wf/Qzx32hI=; b=hJCU/k4cO3u1JHjcSh+FY6IIE79JipMr9vSSniqmEjk6F0rfK6m6uf9Fx45iRAdSkoBDBtOEU8Asy4jcrK9to+U0qDONf4YlTtmI0lo69Uo/VfoiEkesZ3YpT8ImpInm+9TpacSEORf85KVM5rdtcycjmmmH82lTZJ8yv42nSlU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:48 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Sunil Kumar Kori , stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:44 +0530 Message-Id: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5fb09e21-4388-4fa1-e0ff-08d59e0443b0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:V613vZZoZiHqe9Y5yQqwFTm+lx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gfw1ig6NoNG73kMjAGCJtU5+O1sev8GrI+1bh6FJooR1dKfpWPnB4oVzalwJ0uylexeAK3mfeDLKPklzdQS5f4cdwpy2q4mR/mZJBC9GdY8ib9M2c27MKQr3AFOPh7tRSYWTR8RC3UkkCNxmatrB4nCrHEnjX9fM8ZSMw7J7tE/vwzSLL5hbKpXgzOVU5cy9O+YEmASOJ0NczEkLl8NfqE+BKD7HwJSJ8VDRpKWlUqcF/bs0WVUFuBr0eooVkqt/x61JImio5NktO3BZ8pjLGC6mEYtHm0fRCgkNFNgGW6Ttrajh8alF/Y7Bj72NAaPEDSRf/Shp3AAuQ; 4:Gemxm9wFoKvbqL5/JhjV4av3hX2LRPsxkLsZccpPOHT776bs1WwVEEKfdnDboZYoDnL8wlONno/N5WVOqeyr3Q9AduTqlwLeY3C/NBAQSR+LggHqY8SZRb7F6vnE9PHf1AYR7Rlg6nLTJ8jVC8M531P7LS5JZNA/lFBcqqGUEy38hd/AC3Lz9Spx4cyaBMRGKFqN5v2RnedE8Bl9cMh1ww3UcvcQBSjl6Wd/lSZr5DGQL7/fhEI53SiDaz6J7CIEX+Jsy11krXQxluhrGlcE2W8cZg5WYchmTMXniR5i1u51+MSoAeLmR3DEi8nuy9FCvp5LAFnqDnFogZgUDaooDIr+ad/MjIluCphdykRlHYo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(575784001)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:GTFgZdI6Ty6p4Q3G5p8aHf6FlhoA58ooImdSnBEih?= QG1RCP9V+UmRjsrq+GYekYOy3TR2+3vAUydbABQoYr6A+HVvYzl8ClnR3dSkCyYTuJ/4YwBPp9I7fm1xlgPAKYc+k2PXte80dkcjtCXoQodZfZjBKqsm5zm+xnwdBCiiHhYFUBhcfvnGZIhcoMguMYtUh4DPqLMhhu+41SEiwToJ5aoVhBeVQtA1Zmbbzn4os9H8MBqFfreWHri4OQJkm+fyDymkIeq1lYReiu57TKo4RAa4eskbfPfDXL3861mwnAEocwCzbxN3wegpI1jBNdeZb4Cvl7pYinypC1KkrofXOBT4wR2giPLUlIm5pb/C65pcc8oEf6+UXhiAjZ/2BQHtW8/bJh8Qv3hY0bhiTQx59jMgTSbORH+AjFWLuYT75vgRXqY6krjjba4vGEXumsL56ojBqdEL2Xv5A1pExIb/5XYmWBe6JO+0bMt+d19l6UcuYas8jpx+qQQz9toPKlzDiXYziQtqm58NzW06WrfOFL7LWKe6YT/aoJRlWfl4sBIouP7UbhFh1wAoeydNlQ1+HijTr7G4d8QLGqGp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Time: 09 Apr 2018 10:25:48.6141 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fb09e21-4388-4fa1-e0ff-08d59e0443b0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 1/8] bus/dpaa: fix the resource leak issue 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sunil Kumar Kori Fixes: 9d32ef0f5d61 ("bus/dpaa: support creating dynamic HW portal") Coverity issue: 268332 Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori Acked-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman_driver.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c index 66838d2..07b29d5 100644 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c @@ -160,6 +160,7 @@ struct qman_portal *fsl_qman_portal_create(void) &cpuset); if (ret) { error(0, ret, "pthread_getaffinity_np()"); + kfree(q_pcfg); return NULL; } @@ -168,12 +169,14 @@ struct qman_portal *fsl_qman_portal_create(void) if (CPU_ISSET(loop, &cpuset)) { if (q_pcfg->cpu != -1) { pr_err("Thread is not affine to 1 cpu\n"); + kfree(q_pcfg); return NULL; } q_pcfg->cpu = loop; } if (q_pcfg->cpu == -1) { pr_err("Bug in getaffinity handling!\n"); + kfree(q_pcfg); return NULL; } @@ -183,6 +186,7 @@ struct qman_portal *fsl_qman_portal_create(void) ret = process_portal_map(&q_map); if (ret) { error(0, ret, "process_portal_map()"); + kfree(q_pcfg); return NULL; } q_pcfg->channel = q_map.channel; @@ -217,6 +221,7 @@ struct qman_portal *fsl_qman_portal_create(void) close(q_fd); err1: process_portal_unmap(&q_map.addr); + kfree(q_pcfg); return NULL; } From patchwork Mon Apr 9 10:22:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133012 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp108849ljb; Mon, 9 Apr 2018 03:26:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx48uiT31KYwF3cOEhnVYp3RfOV20DLFCajIySRn811lmSdCRpi7/vW6os5+w+IIG+gJOdNxf X-Received: by 10.28.45.200 with SMTP id t191mr18010968wmt.7.1523269559965; Mon, 09 Apr 2018 03:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269559; cv=none; d=google.com; s=arc-20160816; b=Nw9m+/qf1qb3OBzHo4ML63Y4N27GSQaATCJeZSc6uL5u9MdH3ASk+RLNaS5qdZsmRh GiZiyNQuN0Ze/dgWmfl6S6tH8mHLKT4eREkXFyLyfo4m3IqoGPB49Mu+hNoEmHbvuFu7 r6A2dlFlc3T8WLs8TGMFNb3IMCdjE0ZmitZa1dngc0c0ZJytJJswT0dWEhN84OE0y9Vd Tq41Ce4JVfzWvvyzOB/RfTpGLTHJRN79ekkkDPutjacMyc34G6GJb2T5CR+aYSkG79MD Vysp/UvcjxU48MJGv0sJpilWZWoRRTrCBufdAEJjNT5DdIRfEhgtU5RmLdlUWoAzSjTL j+RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=1fjCNwh3z8miiHGcJq6t0NO4OZV4XDY1oYhGawSEc1M=; b=SeHnd+wNq859a7s0v6LemCR55ltemfAWZZIn4hv2TxqjC780MblBdrMICpk1EO2N9i 7f+XeYBlI0aQUDjfS2ABHm7CWVqyUB82af2tI2BjgwFuUwh7lodUUCHTwCg/ZETAF+Ad NFyluaRt5P8NU8ni3FE7Mr5EQL3To7kyOJtH0IgEfVrpjafkyn1opEQgBnzvhm87MwNX x1nfiLHwHZIh7vECtuEAkcTR1iT74WB4AgTRm9qhiXaaaZLqN3h6fhJnTCpWxniPLzSv tbTUGFz67uRioqV52WzL/yPYa9f1J4poq5Ylp/NzNqT5VjDQivX95Bhl9ZHrMhHScxjq CYZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=X51ycSn4; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id e45si23992wre.120.2018.04.09.03.25.59; Mon, 09 Apr 2018 03:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=X51ycSn4; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0BD91B7BB; Mon, 9 Apr 2018 12:25:55 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0061.outbound.protection.outlook.com [104.47.1.61]) by dpdk.org (Postfix) with ESMTP id 1DB131B7BE; Mon, 9 Apr 2018 12:25:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1fjCNwh3z8miiHGcJq6t0NO4OZV4XDY1oYhGawSEc1M=; b=X51ycSn4CTFHDF4dSgll63uCZ1M5fz8OEe/Frp2TcxRzh14l/2Cx1ZnqL7zXgSYbh1DVreCgus20LJf5BQgd7u1Ao5q0uIDVnScWq6I5/JAEFonP1WqYOs0ZUdbXBL2zbKWIV+00YW29UweRlvJ2OIPZRuRsmcar8G6Dz+JVyRM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:49 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Sunil Kumar Kori , stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:45 +0530 Message-Id: <1523269371-28799-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2b8a80f8-8b6c-4d31-c424-08d59e044476 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:znILechAeRl8ggs/DRFL5LJTccn2ZWCfbm8Eavgu5BzDH3VCM9+KixF5XgvKwStf3ax2+7bQuZqfWKiW6a0hyPJjnrly3aBo/jtFAOy02C9cbs3MrS++x5l9khLPNRs+OJ7mwxkjTkBgYi0arL0xKAJ/VJbftYKUHehwGbUmsv23CfvJMmWnwPwI7cAL0yRq2VZM9DSLw3UjbdH7U5gsAH07bZEy/prpgFHOgSeCSf/RXVFuNorSlX5B5BuCtyhU; 25:b5s3uEn5VtDaI5hqOe+ymXTH88K6/l/C9tUoKJ5UvaVoxn0yDg/vKngz38dLd32LS9NV54sDGSTzkNpoF4HpScq83MOXi3QcL3X96J6A5qN3s/gKxe+zQnnZuD2D5klRMc8KNyJFFUqHo3VxKiAelbbPuSbbm6I4gu5Ba5wEd8Mm4ih+IP4sk6NdHlmp3kJW01nrwLsiHxXtc4oNu5GElfEZamir19+B8zKAyREC+OpntGCG6LwC8S6HWbafDdNFUKULbuQb5v3T+TZ7/hOGEzt8jvVLt1QPwKCJ52zEbZGbuavm1s5sTUOZfD5Z+BHttlmzLk35wj8eBKiiEN3A3Q==; 31:LfuGbDfC9elHsBj46eDkvY8fjeQnfXXjFPOvhIGz/XRqEkwhG/4XMdk+XJyRpwm7RDp3ak0qpX55IExn2sAg+r2BbNg99CQrIF7VyM0yvt+lg9taKkL0VT9BI7q83xFAqrZ6Xj0PkX4RNYn2R8TjreyfRPIqZgY4juLFKMT9PPULMrRp0evM6zmL7ZYM4EWefw5pIf6mxJ1t2kbs+6+YpYTu3E2STVILjdPFyzhWjNw= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:UE8QOcu60sYvtd9bUiuMgBNg3m0CUqEoMJDl0zKjlUp0Lf+Tp7thSWD6etbGYjuT/bsqXfQTeHDHncCXL00QTlT0Mrrburd2jJvsGk/2kYbB/9DDe+HACCi9EYav1zFyn3C87mzGfIJd0ezdC+QkAdeDKlxt24A6bYXv2c+TwC3wxTzopr+vZT5OLa69g4586DaFjmvIfCl98rn+awf8NNrhPBEdirMce3Fzjq6ye7rtv+L3D7da8rrfEdLlJ6TTnWNb60xRiiRmi1yalWWlxpyoax/jiOZVx4RVrNLE8pbQDMJ+f7LFbNJwYsuSWFexpypkvRmCUuOSn+DS/TC8Jg9I3oXWL1+kExWMYjG39EiMA0XLgLKPkd8eRTciYhnqbwSXD2NR3Y9Bh+w9UVuaFBTaHuoXQkNn1zKYZFcsuBOx5fwlB73j6Xa0Msg7ntntF8GGuaOt5ipec6PSfP2eIFuBL1iguREKzTA4oPStBMeGDyUiFPVnZ3Ou9MSJUyCC; 4:RU3HjTtvi24JMsHkvZFsmOyrSK3vQyhJjDuTPQDuGbzrk+nYCeJ2/FUAd9PY/LpwSa6ld0JqRcPR7YYXfMih8u+FwR228ijmWHazv4tyf9rldaVh8aBK8xqZ8aNsduDFRz0KUe9Gfkib8jooXzKnMGDdzcqv3eYWouEyEU+Zhio/fkFbWwkgy6ZI79q6XMoVIb7apnqRtH8ORJlPKLa3Tcn+b5wWvLmfrAmAqRMTHrG7lFBHiyslTQ+KL4IrCJsGkZY7hlsp7dsPvb1ExE03zR+QLw8JJZD0sHe2GVgT76pC0RvDbPMoPvuDx823JjRKMONLXHRK1egMSOaOY9FKJlei2STsxzzZw4G0VR9HkMxz0WdKTmP2o8Z5czCAu96N X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:uh1oWYsYFF/4tL1nNJUfd7WZ9DbqTYOEI7g8zvOtz?= 5EZTFghcIQWlv6k80+hRtWLcnJ9coKxJxTTQasL2KvcBrqnEUYHDTQIWHRPCSqbB6VIS+iplEDOSMVYaKGoUFatk0yv0H3ENCRaRLVvjIdMYl1AVASso9nx2B+4ua0zM6aJrvmRiBlUBl7rn2vZRswHEgdbYq2PU5lZ4QwZjKC9dhGxV+Ef6+f7y0rffws8trikShx5g4XylckrTAehKGm74L+HZwKuapYj982h5dj9F8RXSkXPqdph1Zxw7pkgzKF6OquNpB4vveFi4dKSf/MM/sQHmv2zWGu8sQt+FSKVi+4bo+LIjvGfWyzLnHRhudoxmdQAGLT9MtBMS/bMY4LhNnBFuEMN7dHbtOLQuFCsFTyO5X95bAUWEibej6kGTZzs+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CdnAkOxQnBQVDf/xtg X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 6:cj2IB7lU8SG9XKbYxhJZluKNAcR8IPlnbJHO5WxJM1OT9KG88XKiJ2yk9TOfT5kK2FGT24QP7TfJyc4hxfIssv8cEWRn/osUg313D7M7NZzOdJSVxf6ByL1xloscpcgT3FlfPaCb1ubyKA/+xDDuuF+YVrZ3gb4beyQwcWXi17Je5gpxMXRPg0m8eahVGZUKvx0BIHcGKgsGD6neg7wHNAnQlaNZQQNo66qbjY2U2sYa+HxZcsBzJH7vCijEGZt95krJKn0mDv2Gw3c5CwvO2ejZmJKZqptZaiPwbOBb0ljJq5ezT4lH5Tg1G5gsd4oRt1DIOIDknxNdV/msay0ej/jm4AKwl7Xuv/MdVOgXxyLkc6ocR65oywG6UR6C+BsHUBGNkoSR3qpswwtJCAAxKaEsFeIVbXtz3uDmcA/XL3rYwXyX+Pj4gwJevaRYZl+YLTaWZXjanWUNyh/8AakCtg==; 5:n+nGSFHHr/opZweJu1QkXmP1yDdatMDmI3JchGptWtASUb6T0h89BZ8qmQs6afLllYpCt+eljr58+2V1+9HTY1BhZH1nJHgiwbI7FjbWbq7Uj5Rt9eB0ea/in7goYg48ESSct/xAmK/dmhxgdG8p7plMy9Pn33+7h2KQEeB4z64=; 24:RcSjsb9NIt3PTrW04HJ8grF6yXOylWpMzMEQg1YW5UliC2OpEIP2t2k8AFkmrdbD1Ze3TCMwP6TcRtbMDyQj2PWEInsEjJ0ZDAfrie7ADDs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:jOSW1MBbOHOe9YWUzHK2f62el2q5CTwnLoG8JMnvD0OgHwc4dC+Dnczzc7VZawiR/3zmPjRrn0gux5bmldfiRRYV6kQhWfZapU7oJ2GULEcxydrUEgEmqy4zW6fr7xG0XE09EIZCqf4XY5GDf3r9sZeQB6GCIkeqy+i1Q68FqQW4TmbJ37F2zoadC3uPWr98HxgTs1BliPDcYGm+XblGJwdlffU9xGPRi+ImgW12akDGPPQN4FZIcb1hkkLqrPx9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:49.9266 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b8a80f8-8b6c-4d31-c424-08d59e044476 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 2/8] bus/dpaa: fix the unchecked return value 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Sunil Kumar Kori Fixes: 5d944582d028 ("bus/dpaa: check portal presence in the caller function") Coverity issue: 268323 Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori Acked-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 3535da5..ffc90a7 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -308,9 +308,15 @@ rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq) /* Affine above created portal with channel*/ u32 sdqcr; struct qman_portal *qp; + int ret; - if (unlikely(!RTE_PER_LCORE(dpaa_io))) - rte_dpaa_portal_init(arg); + if (unlikely(!RTE_PER_LCORE(dpaa_io))) { + ret = rte_dpaa_portal_init(arg); + if (ret < 0) { + DPAA_BUS_LOG(ERR, "portal initialization failure"); + return ret; + } + } /* Initialise qman specific portals */ qp = fsl_qman_portal_create(); From patchwork Mon Apr 9 10:22:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133013 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp108940ljb; Mon, 9 Apr 2018 03:26:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+k4inxjCLPLxYREZ9n9rTH/hhvWCgNh4Pzy/Ud0oeIRMMdoy717J3IJBZXMrsnKobDSoHE X-Received: by 10.28.72.7 with SMTP id v7mr18187045wma.155.1523269567270; Mon, 09 Apr 2018 03:26:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269567; cv=none; d=google.com; s=arc-20160816; b=TdnI4W3d2ikFbzItMgwky1FJs/pGeT8CaFLtiLQXUBErtTKfliY4VlfzITgos6DYvV TL5dezaPdyFvcS6bTtiSUtKiV8cgu/QcxGGY7CgTNBsWmsZ1pNvXm1U5LpeCLpiLEtcE LxZL8t52qcWCXaUWwEWL0zUAPLH1AqfQ8am0wYouQSP3YXeSC/eTOKyUFA6CBQecM72S FOXhlOMSSPEChlOqqNz9SIeaqntdeiaHjjlU6kDbXFNdS5h+IHtu+4WoOAVbguuKQ+Bv xZszrnvS42re0kOy5qB4IkOo7nnlCwdBSsE+hk7sCP/nsBRs1xt0HCVcDr0Lu5J84z/u jNLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=+2GpZnjyhFhh/HMW2P2LtFkC6NGtbpzHRPDq39myl3E=; b=GcGhtxPc6xMwODINLawuCguCTCLRmhZ39/Rzju4m1Q8cnNwtx20OxGg9b7Ebd2AmB+ 7daGiu5+UMsWHLCNPYsP792juNa8LWDmd4MyDehTmOOUfLkVgzlSxOGWs0bDGrMCo3qb LA7WBWUzDEgCb82BhQmxIAa/KRR14mpop+lCd6RR2RvCG7AwpV7cI4pacmmukDh6IlbQ lBCwGUl/OFbCfOlNb1NpNH38OV5zrrYyaohFIRmMWJnNmNb75OwDULKtemxOH4v3kwYu 4iu+h6YMs5S1mbtSwBxi7oPaM2BATbY2kay6fJvbWfhHvIxMirzzF7RXHS3etZvfKoQR 4B8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=dxrg2M0g; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id i26si208123wmb.176.2018.04.09.03.26.07; Mon, 09 Apr 2018 03:26:07 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=dxrg2M0g; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1E9D1B7CD; Mon, 9 Apr 2018 12:25:57 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0046.outbound.protection.outlook.com [104.47.1.46]) by dpdk.org (Postfix) with ESMTP id 350C31B7BE; Mon, 9 Apr 2018 12:25:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+2GpZnjyhFhh/HMW2P2LtFkC6NGtbpzHRPDq39myl3E=; b=dxrg2M0gCNQW3OBJScuBFITWhfCoIWGaDqv7xlW5a8ls+KXkIJfuf9uf7r334/JD5Mzj8BIrKeRRNGXFbuCKEhEAQaJjb5hu4DplzMtWA9GpDikBUvZdon7GEA8F7PJOOg5dIdS0PAaIHHSwzWZygmFoQXbDA6l1AatbHWtguVk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:51 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:46 +0530 Message-Id: <1523269371-28799-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4fb6d0e7-c85a-43d5-1df3-08d59e044533 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:Py7qT6WhYNq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kVVyreV9IoBTvHUiTEtgAN2BNWwA7rX9CnGfJkTYIZPBtSr96cnSIiZ5NvTBFb+GQQ0izgfGlRyq63fb1Y2JKJOEtS18qqMExDsWRXu/lk6OuWVNa+gHV4RxvdhuIsqw7XViBpEp1/eiBns8QWvqTjQbH8pLjLjEPzfnx3FYf421sPaeBESUmjCVVH4YntrwIKbYLRF6CBb08os1sspNsxV+Mi9D6cWdFE2sHmjJ1sH+q6xNgI4FHazwWr5wOIBhKfZmDfbuQY8H8wZHqJf7BdSj2qnJ2l1ONgK0Z6pNUV8XAiE+T8ZOPqtjB0NxsaPC3XuHxEYNbp/4js; 4:lsqgealx5mFxTQSfHKQ7Ue9x2kV1FJ2IlxunnOZrK9uYsWZSsZWzS83KaLUaqsAOHe2XO8WXQccOMxy0IK2mx4mD8DJbtd+RlqpLIAEReTPXPKawy+xAtJMLfPoIS6YQoyYBeIFfi7ObNHyqujauwCImnoSaW/NGcHmVg/wAYnqhkiEzBdhxvi0D5W20gFu5H2z/UKs8mabWW4vCsKQIrpqAw06B012APWgBcIZ7g9R7puMQ6Tr5+wG6bjkznalHjRCa/Mi8rgayidxvxUd6p5xt0LZBC+ggRuyZd1dmBPRfWe7GGw9kCnxzP9nQR+Vu X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:uVen72s3I7zOIrKA9cvjJ185hp7Vi3gGm621BaZC0?= mN5MkgIStawrr1Q8Fqf4IQABfmc3bPCdCwzwGiQYbbd2tS1K5cw4zM3//1yB2jgLgQyjgFDMUISlXFZzDGA8NExwGx+uH+0W2xjD6y7/g/HCNRtn0uzldekl5bnhutfyqrT57OOI2PWZ6OY4CFizuxtuZp37TWFLovOnjj4xv/uqByJA8YWplq0XcQfbzxvjhLy3pEphBNNHT53fMFmb7EXJxDH+0P3EsLiILvE9NfHg9XymqZcQ2tZ3rVV/TQ94Ntpkxs7DSYqWCdLkmppWP9K5I58V0R31EyWjmsFGhi1k3qafJx8IGqD9dCjl66fM4SWa0K1f0Sob5dUOi1E+HLcg8ypmcm6ecRneaIRYfAIiEODdNU/vi+km+MhbZ2tmlt48ICCH4Ko/zrQXGuPgbXZTDsvt16J5Rn6dacrg4G8EzPTbLeQbjc9GlNhtqstoiRYhNb0UDFOp4fgKKvKiEkq8pyayJylyQB6hcLKMTlLq78JQtxNCIQ9ccbrGJTrh/RnQoxAdpD6Xh9jtDPIONFHyh8axy7+NWlTGAH073nFqk05p5ayKZzh1Ym4HtmYkyU3uX8gI3C2bNqE5RMKPAsJ3hj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KHkJlQDttaX3K92tigyZiENV3Ufgq7iFgIO7xYE73Sy1R7xpa+74+Mx5kRFWDns+VGdeb6/uUbEt7DEIjTTF+jricw8gKeQD+JWBm4TUZ/ffBfr944/fKnuADrKOp654DIE5Pa6J9O4/h2arKwTql+dUWG3SrO/wbLD+7JFjMBCfLNjez3jEH7fJNsJ5vGKLgFlJJGNIcrweto+82r5QLGKZqha19XV923fDy5T33r0zTj8TafGp026J3etGMxAhyHMvmHsLojP5RU5zBR4XZtwTwgYCaDjIOyMj0hZw==; 5:pYTmLGu1hmTnk9xzawA/iM6mP9HZplfLiHGI9/XpYDtuKZRw1ThdyW/QJgXONpk3IyiODuD/khveLQBc5AZOh70DxalWT3J5vx/cf322KOIB0Vx9NYdnKUJvEqngQIQMAcVkYC4VFoSCP3RY5L71fBk8qRo+sLjMGhTP5AO4qMQ=; 24:ZkPbMy71M7PJlCPpDVBLEaTzoymrMKQk9EU+4IEVXcr/+Vt7/GSYYgOXNHGRSpQBJBwfcqtpJ2PXlLxelSeLz8jzvGG/fXoHG6mfYqlH/Co= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:eJOBFrRngZph7MhGf9EtNqHjP7zG0UfBs9W47+tKPc+MqAXBQaOm7ApY/kWxOEZM1RQYuXS0+n/kXpZT2W+KnDsPf24JmLj4de9YTkP93sNt7clKyVsx4b4U9Kpar87zx4v6MPV9X9lkcBIctwqMLOc/J7ybL4hBur8B+J5Mupd/Iw48SXnncXX2A8ldjYleBnm28nPygOrpY3w2bviAoHzbV2H8Hxd0Yn0sqegwZ7B+k+7LPvhbLx1Wp8Lxv5hB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:51.3172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4fb6d0e7-c85a-43d5-1df3-08d59e044533 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 3/8] net/dpaa: fix the array overrun 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR") Coverity issue: 268342 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-By: Shreyansh Jain --- drivers/net/dpaa/dpaa_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index db49364..0aad111 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1105,10 +1105,10 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE; } - /* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX + /* Each device can not have more than DPAA_MAX_NUM_PCD_QUEUES RX * queues. */ - if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_PCD_FQID_MULTIPLIER) { + if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_MAX_NUM_PCD_QUEUES) { DPAA_PMD_ERR("Invalid number of RX queues\n"); return -EINVAL; } From patchwork Mon Apr 9 10:22:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133014 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp109027ljb; Mon, 9 Apr 2018 03:26:16 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/CpU9CAduq1Gh5HuV7x0D8r/FRs7wbkgez1Jd9XRIEZtw/iV0o1D6XNd4fXA0oQy+3Y01Z X-Received: by 10.223.133.6 with SMTP id 6mr27016684wrh.53.1523269576178; Mon, 09 Apr 2018 03:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269576; cv=none; d=google.com; s=arc-20160816; b=rvl7bWPmtjiXSQwTWvh3kxN7Iv5Pp5zBVQ8NbdL5CY2cg/Nb5pz+PXJ+PQ2wBSu5jR 9RzAET65m8fF6PvvM1HfCYOS/iuBYyKe2V9+x/xBd6KfQ0iEB7tpDJQqE5WPL6hltm/3 Oq42aGRW5sbNaBZuQgCqQQ3HHhZ5IAFFs4ND0uf5w++zTgSx6pTplrMKutvQLF+LikDE CvRUG3s8l4WZXr3v3+r51pX9npMWvF01G2Bl63vWSzArMesawLvEjQ141hnE/I7/lSXt ZvXLXME7vYu7EVnFrTyMLIa3OO5S32thMIXTcDfJ3QnOV9S5tLwso0ZjXXhoH/5//Lik +rMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=hp+/hxuGPz7CptGzxCHgM/TDreOSOnKptDM4TUYoXzA=; b=Rk2Da60Sv0l+9patMLvK6WtJuNp7f0OYJlJ7oR6kI3NpDCtxK0+y0UIJEogic7EJhu 9xA1UtZZ3JKB52dQ9PrswpGTXelAZDM8HaK/+SMRYPf4nJfNaGf8eyx5b/3LpwwW1ATy dyfKbXpOXnqaUVxBlWc2ay98rFhFjkoOBlvLN1PzNbnal2g5YEI0fIH4oRcHdK1vhJ4D W04QWAqV/ymre42csiChl4ZxHSqygqwIlrHK+rJhlseQUCmti1Mv7A/uQR12C4fseFYR A0nfurtoRjFOAMf58L6SKACGfghOUzJy2bwlWF0nQv4FUK4oxLKgbU5guc01Sa5/YlAE LJ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=M+CfCgOx; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id k17si9899wrh.432.2018.04.09.03.26.15; Mon, 09 Apr 2018 03:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=M+CfCgOx; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5824E1B7D6; Mon, 9 Apr 2018 12:26:00 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0058.outbound.protection.outlook.com [104.47.1.58]) by dpdk.org (Postfix) with ESMTP id E18CF1B7BE; Mon, 9 Apr 2018 12:25:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hp+/hxuGPz7CptGzxCHgM/TDreOSOnKptDM4TUYoXzA=; b=M+CfCgOx+HnCcRuG7rKsv1Ks2XrkuKLoU52+DzZWcmfkGuOzELwDEAqL0hpl3QHG9IPJeCxbJpwlsH3tZGLyU3a1fximQyzR+F7c39ndM+4X+73t/99HJs6xzB+pzJ+1yXUvV6Gvmhz1+iZ8pTs/O6Ai4x9pu2Y7qG9PWHGgPFg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:52 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:47 +0530 Message-Id: <1523269371-28799-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ed1bbc1f-a51b-42bf-77bc-08d59e0445ef X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:96kQWyYorHIX3m8gP6GfLU2FIUQ0gOVj8SSKvQor21aeZPK1z22x0GQm5r5ZhTAVkV5raGaFfzb5jEStrfggZK20+TK6lo9TARJrFhP8v+I4V+XPaR6/SNv2WNn2+JTaXtoGwy+C5esDQ2BLIyhVwZmUxrNvRK/3++kU9to2ecbkMYxLswDsiEmzAxtC9xJ1e5MsDNrLbnctPp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Gpls7ImOrV/2RWdxRc7JnG4OXbtpgcRH24TEwgUJtmWRV1+Y6JPnjRUm9IXBc8Bv64cF3vHRn9Cd3SEm4jk3LGpy+wyZjQgyXYGXse4TH/B2O9IU0ufg/jhhQP64kIBVeUZf2HYObGU; 4:3Ni4LA0vD8/IhZL+oBFhzevrGCWZs9EM3INDGwD3r1jOm5HJ7iDXMQ0j833gkxzcI4hMYRfWhDD+fHIdAsxxx3hVefHGkTLuomTrpuphvCbZbZYkL4PgC67Dn44i+3XgINTxe8IuBN6Xc4q4DboP6sxNVSkIc6oNCfsxDc+iUXm0bjRMRoPeCV3TcBsoULojeWjMtSi6DFJlyk0+Tcip+fZv0fN7H+M0wtn6JKjKY/63JU70at/ivnkCFQnyyECtwkwqM/eHm3GwO7nvBrSKETvF5BfBuCpdNUuldXb+OTJfRmhTfd/tEFkgfVJ9LaN8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:mfVPc7khji7k4dmRP80fElqf8FYiI6s1Wv9i/kC7B?= eJlKwK7DLOQpCT5SkXU9m3OGkAmd/s7IOw8BjFJp67/skM0tnTcHQQDrMqjFhN7zO9NVnCoYK23Cw30heYSMHKY80g+AYI+EE++QkIbLTe83+p6EWXU7IwJC6Td/1ScaIVggvvvRiAgHSCPeqt6144i/hgEPrOllmVlCxFORodQjw/2Yw6vUv1eKfvdHWJsZuq0Pfs1aDXaw+CvvrCGG+pi1Fzna1psIi+V0B0NTUmcjEuxPOT8/a7CNiRKcMCjzszcCqk945GfmcvccPkJWiIc0eS7j9BOSPw4vK/UamjmvQMPtDhRXjDwdH/eicsz0Z3kjweobu4MEXTMAjk0gra5W+6hUJdhGqDyns8c4aZzx6VnLLSuEQ7FlqgYD5fcVk5QUhvQ7sy185hL4aUooY4KUFzAaKrD6p9Vgvjnuq/QFOAINFAzsGw3uxj7aH74YY/Udf3OdA4lnCTA9s+m+S2udJpNWRXSZx5qB7Rfcl0Hy5IyAYS5AFu3l784dqd/epQCSUPLoF7W8FrdnW3d3oQ1eyH8jmIuzuaPgx2/U/oD9Nrh5FrBuj5hSXfaX/ntMBJzi9/ds65eV5NkEu2P54VoNTwadM3xsWhQkVRlrxxCXkY6JU3xsDsICJtL9t73yY2kUVKF2kJzmvJ2j9qQJVFvF4OoOgrvMG41LTa7KwrMXRD1Q2djHJzQD46M0WvtvSLXjB6gfdZYuhdtruaoZcC/8b6Mewe/LHjFA6gOj/rTgyRK3rkHZHowF8GDCY2yLx9FqT4mK6VQblr802L6D+ey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LsIj4c/ZEIdxVSz6uXFotkGjP/seqOI+oRnuMc4FSlw5FSj5oIXKaOApp8B4VJnTehCjQWVBC+QxKbCUpCvqY0Bei8G9vqMEqHlktvJoEBwmn28WZ7AzJUOmgj05WXK3xBuQ==; 5:tlRnD0me2gYTeMsZ5tFvhj+tw2Tdq5cWG/ArckVlhp+h5vcvPHCu6HOC476s9vU+FXoROWzRVd9SAlZuCcKt/gQp8kw0eksyee3+3Am+9MzoaX77STr6y24c4BIJku3861hEaGIXzRFSfQa2HswSD9NrvGGI61+N6SrSD4u9XEY=; 24:8Olrkt+fC4yeRTovU0X14RNiqTR2LD3tPsB2KfdIAmpKCCDB8Ts6qJ/OpaAkh+v+X0PEduqVe5+RUO0aPjlaqixvl7/TgtgziWHlWJc7aEc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:cfd3DFuMeR4jFpIGRnqMMA+Of/gXOjzesJ3jrqikIF0C2rN+w/1q6sIvHNpJuu+vXeP6hc9qKdQ0DHqRXuJNFtgiGLna/8+1Tl62GLWLdwTzIPRHfvTzf9ydypwLBESeDhmouRhx0HsYY7rGh424+9qE2P4g9OrxJk4W4v8fiXnHy0KbZBAtsMH4BkG6JNBXJyjoFYgmOAoP+8NPxinbQ5rK4n0yXgxP4qTs/4SE8xTW9gMeci7W1B/T2xmSkViT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:52.5360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed1bbc1f-a51b-42bf-77bc-08d59e0445ef X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 4/8] net/dpaa: fix the oob access 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: b21ed3e2a16d ("net/dpaa: support extended statistics") Coverity issue: 268318 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-By: Shreyansh Jain --- drivers/net/dpaa/dpaa_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0aad111..581e3a0 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -335,10 +335,13 @@ dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, static int dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, - __rte_unused unsigned int limit) + unsigned int limit) { unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); + if (limit < stat_cnt) + return stat_cnt; + if (xstats_names != NULL) for (i = 0; i < stat_cnt; i++) snprintf(xstats_names[i].name, @@ -366,7 +369,7 @@ dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, return 0; fman_if_stats_get_all(dpaa_intf->fif, values_copy, - sizeof(struct dpaa_if_stats)); + sizeof(struct dpaa_if_stats) / 8); for (i = 0; i < stat_cnt; i++) values[i] = From patchwork Mon Apr 9 10:22:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133015 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp109231ljb; Mon, 9 Apr 2018 03:26:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/83fVl1nNPIqKqI93uFp16WuB/sy+owHTVCFNrxyWHjL64o3kUfml2Qe4896YNyCFXCuX5 X-Received: by 10.28.220.193 with SMTP id t184mr21223479wmg.138.1523269592619; Mon, 09 Apr 2018 03:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269592; cv=none; d=google.com; s=arc-20160816; b=DmqiFGKnHzKieO7oj0tbChucJqjpwhJ6eUUfQWO6oVn2u5t4ocWam9g74EySCfpvqZ 7JzJbmtmVAN4hsL5yrTkDIG0WH6CFtcuF4SefbyExspj5g0eOAJ1d0ct3q3WLG+XLdJV xLIzCj9J+OTxdmd39z6USqM0ms4SLeNGgGcR7RTehP5seapu8kjY3DR+Her0XSaAU/9Q GA91gL01lzHLq2QUAh0HGfQByBvQLyjJeWvHS1iO1nLkkEUkYd9wt2YoWivvzR4T+Q7w ahgFXPup/FneszVMMfzetPyIpyJRq+0gD2MKcB/6z1Obq9/fDVPEC0ebsVKMCqav8NPK DbNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=xVE3IezyI489z7A8LrL9IHJJcrCaMlD4o6gbV/Skyp8=; b=dR+mzBTLewQE1DpMzShX87YNuswLSaphZLBFdtyhyQ0FuRZDjQsayycLDhwqpKhhob Gt8mHrnSqb0gxHIBhM8RyDT3cI9iZtlLchWx5Q6o+wW0fGf5ph6eoibiV6ct1FhjxiEa eBX6Yxc6PXRwi9+TO/nRa/OChAVeMpn9aFzIo1YAFK7CnT8d8PLrsM4QbBxPknMVfvIr qMckc4IYCcuuRkZ4Fh5oWVlMzIxGcqmOX5l8c2CJ5W2rUP99L301xQH/cazvLTY5Ws0Y KOMjVBQd3es2ymUVUwgPB6XjE49WwzQ0u5zlABN4vKxHPOC7KU4vSseeSM8LL5Q3H+pf m+kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=JcG8DanY; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id q16si17767wra.260.2018.04.09.03.26.32; Mon, 09 Apr 2018 03:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=JcG8DanY; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 55C621B7E4; Mon, 9 Apr 2018 12:26:02 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0070.outbound.protection.outlook.com [104.47.1.70]) by dpdk.org (Postfix) with ESMTP id 7A5A51B7BB; Mon, 9 Apr 2018 12:25:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xVE3IezyI489z7A8LrL9IHJJcrCaMlD4o6gbV/Skyp8=; b=JcG8DanYUuHlgPkBxY9XAjhqxiya4M28YaX3Y7Jh2UTpCX9cDLR8WRcdeppq3DpSSiAGEUNXnA5nEEY5yGpxWoBWZqblp8sXZPfANpfiGp3dSUw2o5yfqcfatCPDeZ8O6BDDwfY82LIF53X9LPMBT3vzL8HdSrJn8pK0Mkt7NNQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:53 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:48 +0530 Message-Id: <1523269371-28799-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b4fe07c8-0f88-4d6f-d18a-08d59e0446ab X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:cAbFE+uLjNjewPxrHNcs4UJ3mVqt+UrUPfABSCUKoXrlda6EkrH9TCp4dF6TuZmYoesA+bXqnIeZqNk83uzeqUVXXTRYdVWstiCRiuygiG/+MpoRGtCEIO4K45A0CX51JSZWJH+t0KWn1c7uCSfK3gvxtzsBQxivHWXTEbinJicEIyQggeBmxROkk875dTXHsYltaqKDe5Ia6rUcFdYUYyIkbpkKPLdOWSWSjnLRIrMls8AO2jE8ZBkh/cI7f9Qf; 25:zSkLBZGwoWfGKB7uAJt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KWuVqgqjL4/DEqjK/LGMoo6/2hcrfClgfFbJeOqW0qampp3NS2vvA5TsSgzKErgtpvR1NORCiS7uP882snmwMYMigE; 4:gLm7fphQ8OAvw709hksu7YzAEeecpZGdvsqbao0SDNdNhwBFJjzFDcg9Bxr8pchcY4M5oXD05CYjr9ky4nTbk6QEUWAqdyD5w5Ruii02XZI+ZOGQmlr7o47JZ3/mFBURz/DyrJCnu5yLp6cHRJ3pGDnXjA/P1gi27hnfh0bKQieDSiHFkprOOTkrs4uW66Ve07oGf3JsDRRssTWSJdqoRuDWSVcrRr4TcobVIl7G0t/Ifn6djuAOQ/XFDKfM5GdAu1OJefLKoYmbDn0e9VnuFhY69uud1OYqnf+3VFLSPM4p9XrYhrIbC5PonQUYgw5g X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:IP9dV+XVgiFjN1Czk11A50LiIYKLIhv4dCHNYLpdn?= 8hu/M7PdmNxiTBRfFmHwQdrBPPLqHF6msmQjWZmh+piSITpPONQv+cbam5iLflwrJeRqHK/RwDPREKtng6oZqDhhBdtwZueYRllfeVR0CsVbWPSByh5bNWQi6biNWgHBQthgHhn0ncd5aj7Vs5rCwo8CJDwX1fyL6dmDWmyTt+4vUURH29awVsoScwD7AHhRvBLaGXMBlKOHpSm/O85XcomPQ61HHTHSPOLZlkzgg6mezomzj5i/bbWDR/KdrlU92Cx5LvmnhZKvvH+F3vg2at7ax/tbCAW0x7OvduEtaAs08mlC7FaCcggIKSZ9UDPCLhzPFQEbEz2I8G9gD5I0gRniV/BxyOF0BRmbuSLMxP1B6+/enexTY77ysPJYVtRy6oi6lHoTP9v9Iu+hvoWYBYTMUeVsKl3b8AsvAjSJW1qHnnrRZbma8hARbY0RGADyg/Hwp7N4ZABNsiFjaxySbzLdBK7evSQStwe3J8Rqe1uh3mp1ksDgriSdNLNXA1uErenP8SpgqyZOSGVKclJYwRF7pW+kSXQcVK2E7JIvXNb3eOcAdXWepJxThXh8/C3RkQm25uqy1kEvG2xhf0y8S63WQ4VwsHvmvPVwnDK3a5S4OpJUp7HJT/ju46kYJ+Jd1RYLYzj/ieAkO3gHvK32V3fSF6HI+UiJUm/RGDpu4FaTh+ms6JtQppoMYGtV9OQLKwqtcWwMm5M57mKJiRkWYjfz6Ezj/jGxS7VceRENxnWG6LIQYo/cj23eAMM+5TXTf12vxj6DePhd0ukimRpnhudMqMeK/G9lDG6DC9nxnCtgN4XVs4IMt6VNlbmscro5t0N5CaIJtCiuMxgvPCo8i5MjuyE9Vi069iF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jkMrJSnRz4s//I6tV+D0wRiDHNUqga/4fEs3wxvy28jlilL2teoMhdjJ+g==; 5:FLKSDjTWwLr8gJRYzhM5V5G1z1tq4yQCqKDz5yWNIZduAQhu/7O6qeb6JiIAPd/KLx77CahvVrzwcitt/WMpgVeEN3CGGH16gq7N9YcoN7wh30t6cA6L9rMRkewJhymFsgY/EvdZPUnlrsiKo2d36Nx+7CrE/cuZnZrbAb8Z3Vw=; 24:u86JupEl6X0WGR7u2X7YgSuCdN4963UrIEosLR0dRflWYtkApIQQwSGVjjvZUuqzRNk43itm5qDPDFHjtwas2eA1HIRMZepo09Nb/B4/2As= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:nKMLrlx+PXT/a0cq+aDtLr5OZ2HstnFvTjV+JnLkhHM7H2Lz8GXzn7UlkIdqpyWyLamjYYtt1Ma/47doJ+y/6Xc0RzHlNNxaoXJmw5FJ9yNNKbnFZUcVE185mZV2OY8RbCziImGNzLJAaTM2RNld26t2m7b7on5YrI7v8nIFYUrHJxOqVyQiMWFHP8B/v1Glg+DoV6wpuC7PwfMgusFu4UCRZ3p2YnKaGGCGa4TGYlfuOwXbUmWgSm7onL4I/zi0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:53.7860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4fe07c8-0f88-4d6f-d18a-08d59e0446ab X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 5/8] bus/dpaa: fix resource leak 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 1459585888b5 ("bus/dpaa: fix memory allocation during scan") Coverity issue: 268337 Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-By: Shreyansh Jain --- drivers/bus/dpaa/base/fman/fman.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/fman/fman.c b/drivers/bus/dpaa/base/fman/fman.c index e6fd5f3..be91da4 100644 --- a/drivers/bus/dpaa/base/fman/fman.c +++ b/drivers/bus/dpaa/base/fman/fman.c @@ -442,6 +442,7 @@ fman_if_init(const struct device_node *dpa_node) if (!pool_node) { FMAN_ERR(-ENXIO, "%s: bad fsl,bman-buffer-pools\n", dname); + free(bpool); goto err; } pname = pool_node->full_name; @@ -449,6 +450,7 @@ fman_if_init(const struct device_node *dpa_node) prop = of_get_property(pool_node, "fsl,bpid", &proplen); if (!prop) { FMAN_ERR(-EINVAL, "%s: no fsl,bpid\n", pname); + free(bpool); goto err; } assert(proplen == sizeof(*prop)); From patchwork Mon Apr 9 10:22:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133016 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp109331ljb; Mon, 9 Apr 2018 03:26:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx49w5cU9OMg0AcqKwz4GJWwW/568wmSXaR+6/taUFicNNRkcB14V7+P26AZi1sl1L+5tiwcn X-Received: by 10.28.207.201 with SMTP id f192mr18364038wmg.148.1523269603572; Mon, 09 Apr 2018 03:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269603; cv=none; d=google.com; s=arc-20160816; b=shZHWOgCYGcbhUuEUfvmjOpdzR2Q/7/ZRBDkeO3PrRXXjTNtzNzFmneTpy/FUcOB+P yVeNrgZAQHFUngTbiDPe7Fji6NzGhkjh0Lc17ReTx8kXhQVSmgV77B36KRLS1vX1pV/y AR014xH+jJ8uKhO3ZkCs1fEfNp5a0xKdgmdFOECRxvnGU8SIYI9+SSl/CT9FALr6NrPX WCcTEGXEx+FZryyVdL6VBpynBY7FHGqFHuEz50t0LEPfu4Kqk0f2hAhD0sTou3nrceNI /00Jx+aKVgnTuzKlcUYns6ObfouOITbeOlKq3X0e9OPXB0rVJ3GZWKv2EWjDYz2o0y9c 6anw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=bkJ+KJd22RWH4lVf5ooxgB+tYlT9k/JSgbRUm7ZwMJA=; b=c+NHEqebjyu5dtrq50MvLSA5UISNHtlsOxgiIBh7/3Wa2WZWNG6U08E7xSNFLpblkI 5LbJCvvrnVc8Qb5EqwsXljvyPild/di9+wugWaqk5xJYflUsFStTCEqua1GPBxDDCvgl 5hUprCjkvwlLjNhYaagSDHl/5Zgu/JtxCoTO8PJw/hoNiTEYoTH2XDiPGLE3kzvgPHAK EmJxew2IYR7alsGFT5z1tnrre7mQuvUfhp77P8ZrsYOmYkNot1Sj9LgVW5qKEn+wP/l8 RxNQTl5chBZ+b95BHfqu/gZokOFq1OyyGiL8TiHilVohueUjylkhcPX4ayYOgVYKCbZo 7a5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=JpuzQSeW; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id i90si232141wmh.63.2018.04.09.03.26.43; Mon, 09 Apr 2018 03:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=JpuzQSeW; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53CA91B7EE; Mon, 9 Apr 2018 12:26:04 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0059.outbound.protection.outlook.com [104.47.1.59]) by dpdk.org (Postfix) with ESMTP id C29A61B7C9 for ; Mon, 9 Apr 2018 12:25:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bkJ+KJd22RWH4lVf5ooxgB+tYlT9k/JSgbRUm7ZwMJA=; b=JpuzQSeWBa2P0w6Z0ZUITRAKLMjVFS8W8iusLisdtX6VJOWCeus8bZjize0a0pj+vxlKAhxO8Ijoy8eS2k1W0tpbHE4pSHkmkPG9k+1fFegkOAuhDQ671EIuDbrJmEIVgghXhpvlfqHZv2cm6S2Puny0PnF8z6V9Z0Bx8VKXEhA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:54 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Akhil Goyal Date: Mon, 9 Apr 2018 15:52:49 +0530 Message-Id: <1523269371-28799-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 14184fa9-6e94-4b8e-2b4d-08d59e044768 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:dk8YnPevtrOulLUTrcCXqV4sk3+dnpG13fA5vVXd0UsIK84y2juApYGw404AhPEdzuLn/KBSptFoQPwGgLvXB0Pd/1pBvgNn1APXmapadqLr4gZV6JWKpWKyLQYt3scYhA5s7tGlXeM0RLBdwo4qkTSYfqQLt5FUCihzYWJaWYL0dg+/fRb3gttolSFcW7xczjma3Q5JDTbt0YeW2HGGHryEpaYCoRCpItkKZ2uL85SmTGhYrq23fER6czl8qxsM; 25:QBKkW+zDkJzr2zRwnSvENdIDXaWuVwC0N506p+o1fLUZPxHpizYHUpOmE/hPdqPic04vrqu38Vi+6qs8jd5i46q6nupTnDPFtj/5JWeabbJhOg9vfJNG7E4VeLrbKsC4xDYMFJRlDatPeSaBOGabmuoazQwpzpn5JF8kWqhh7fzuYXgtaqzstR8FfMihla5R0lisNpwi1FmQZr1SUA7cf5xr/cxanz5FkP8KxfDVL4Hyz0AOHJPhamGrlmQ3iHsl4g3DTCUyx/BwU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gkFvHDxWU4P7uQYHQUfqFi3L4EYzxmCCEGI8bhW/M70Re3jBup+MoYI+YrnFRXPqyi3UGudYKWb/bZzbBjoXWyvyGXIgvV+9BQtVtxQTQh8leCw6DGzCMJmhBe6HUQOxQJRvAXQmOOQ1bTM+IIv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:Z/ANOexpx8Ht8TeqXa8B2kq95y0Ux7R740zJqe0xX?= ujM1tFTq/l+x1ktK38F5WFLv0gX2Wogh7EH56sypOE3A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CgIdWdsbaW7iBLIjEPpuonPmXgtLc00sY2SrmCQzeCNWFcb5j0Qykn2zGLqAtzL9bSpmqUlzBT4NQ8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:50bwI8l0ROQt4kLuZXxAPBhLY29cELPOjcifGv6QPFkEspFtreeuP7Gkzi7pNEJTzSIeSKsnP4+mNQPF/P4X5JjnBvJTPFW8xlY+NDtaVrs1X0GZcmr5E7TIM8cqCsKp3ZzD47XmipnxSGEjWAcsHj9/bMa5PQx76iCaLvusDOoZyw5AKjEy2VRFLjZbfYpOw0qYejVD4IBEY1l/GEWvUVCfEeaJLNTp5yU5GrYADmXiIPF1IhE5QeTQxGjn/+wx X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:54.9891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14184fa9-6e94-4b8e-2b4d-08d59e044768 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 6/8] net/dpaa: update checksum for external pool obj 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Akhil Goyal Signed-off-by: Akhil Goyal --- drivers/net/dpaa/dpaa_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index bdb7f66..1316d2a 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -825,6 +825,8 @@ tx_on_external_pool(struct qman_fq *txq, struct rte_mbuf *mbuf, } DPAA_MBUF_TO_CONTIG_FD(dmable_mbuf, fd_arr, dpaa_intf->bp_info->bpid); + if (mbuf->ol_flags & DPAA_TX_CKSUM_OFFLOAD_MASK) + dpaa_unsegmented_checksum(mbuf, fd_arr); return 0; } From patchwork Mon Apr 9 10:22:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133017 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp109483ljb; Mon, 9 Apr 2018 03:26:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FZo6qWpfNvDaEakjx71xaI9ch492nLH/IIQcHM9JzbdfSb2Q0g9usQ2hR6oVf0C234q3R X-Received: by 10.28.148.129 with SMTP id w123mr16841260wmd.116.1523269615720; Mon, 09 Apr 2018 03:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269615; cv=none; d=google.com; s=arc-20160816; b=ffROJhy3oGRo6/lG+4/VGiHz6XAMIRfJBkiy+o/cZdKD+Tc7pG8LW2cfuwWhsRB8qO G6SPt2j0R6I4UNz/UdRbIzUeGu8nqioXL+sxlLcA28A3FmOJp+h1DeI1i1Kd0LtcHLUi 5jTN2lxmbvpnkthV/SpF/xKZPsEvX+bDPxh4P0AoywxVrfRMdazzRNzgkXvIEbL5/vld L+3aXmJeRYj3JAl2sZHAAcXjiEPDo+i/0IsFAVKNZbzEfptFlOrYv7xFeLo9+Pzpqi8v 2DHA/2X9sX0mNWn2BU+s5myHhRLpp2uuacWCbYQCwUr/p/s0C9NU+MbcEbDTQKbXffqj cfsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=BkDs9XPh6FRPan5s01WlhaEbkXPYea/YMmvk4tB6vGw=; b=L9Chld61V4jLrs4F9ojDvknIDypieTMPYucR7jhX10O9My2WjE6DSZoAc45twMXnVb w5Velk0LqFphYmhZHUWRBbGnOAfh2vHpCr8f/TERWgYt5UkhphVLASrH4mHmnz2D2Su1 bl0Vd+cQ8hxf4X4cMXxJA0mz19KAhTAQmQuWThy+9nT/HwWjfa1LxVmlp6Z+JNIoyk4a 4y4KcxscKJL8qeN9l9H7EHUwjYRY8OEyEFwptY1u4wCNTTqYQRHJ5KR+EFaZoxGB85+8 1lnQu1dC1OIkF8wPzk2MhjqbY+wS9VbPRrxcl4LqhKOTQMiHZdy10gT2SXlW78blKQzw wFIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=SrJmim9R; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d18si24762wri.97.2018.04.09.03.26.55; Mon, 09 Apr 2018 03:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=SrJmim9R; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA1101B7F5; Mon, 9 Apr 2018 12:26:07 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0088.outbound.protection.outlook.com [104.47.1.88]) by dpdk.org (Postfix) with ESMTP id DBD821B7CE; Mon, 9 Apr 2018 12:25:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BkDs9XPh6FRPan5s01WlhaEbkXPYea/YMmvk4tB6vGw=; b=SrJmim9RZlhk90YRCc1283CAzzKTtH0d80FJ0bOQLwcolJp1MjNRJGXugaOCjVhD7FhgIZ897f/jYLUwBveYM5I12IpzmdDbHB+vIwGEKnaCG8YApsEpN0rS4nEyKdz2jLtAp64VrwnYWdler/nrlJkBRBBKHoxeDkw4O7HhazQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:56 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, stable@dpdk.org Date: Mon, 9 Apr 2018 15:52:50 +0530 Message-Id: <1523269371-28799-7-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c844fcd3-dbce-4186-e75c-08d59e044826 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:1ik4ihdSGYsvblYyjeJBw+L2jyQFtfNl4PSB+XFfIzqc2yViOqukUGImN1L4rlDy6psavBAnMP3+kqJ3lBsB9YWxO7LfYm4zBtmasuQlHA5gqabZRnHP/SL0vAbMMd3d+xqgKni4jKftkSN9NVav47zZLukgWbR4dw2Ke9gDY6SJ0134DSf0VjyfEUsF/wJXc+62JY7vmeLrquku9tkkAH/YfHfzQpoUmfiFMQs1bIDLgAMQgn6hwsieV8NFy12T; 25:mTzTBqcglsGfaWdwDi5AzBgMaG2+dcUUz4R6QpcPYJNlvb/9Rtc0yA363QsODlcPr1O8RVHd9sPi6LWOvfH9GB+HCyu0t00NwqkNdR4/aIkzMp6igh6xXR2uLJ5cGLtu0f8iLKZUeJsVZ6wDPRQiBKqnisvJF+JF2vaKdP0AqHz3wo7U37Pgc+8czckfDeZNTGwSmaGsQf1CuC4BbGMiNJiJ+Qcivry7+gp0FIN4yMnJ413u+GTxyEX0WfADkDDRsqOMFYc9J3pKjiUyfxc5qzVURkxDs+8O19ikhDcGWvyDDt183GgtrkXcfiGUSbCSSWlI4WA3W5BIKe/jjZvgpw==; 31:yklKy6XVZ7sCb0edCmpxRuKecF5wMU2qUXDNG+zGUmQ8y2NpJGcag0f8QLZvmb1aPtEQH601EkcgRzrXu77nQD3KDz2aCOlOvCHYgM7UlFaDOzI1wLLsdwhC3vx0ZlC0ijcBR1fyDcRTC3AWge9+0w5RuK2LsM0AwQ8X68me4M8Ce0f2zm6TLcWV6XmNTz+CmlBswo7aRgy0Un/2KFQP8LZp5exieYJ4vkoHc4LG3rY= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:DJGu5RUhjLAjHDLTSo5UWDcNRKH5eNN+i13rJHjDgcglAZQ6USdG46KsuXPYU/v3JTWF4sJ357kNRp269O9vAjPeDXuYpIQq4jv2n2Z+GuiKOGK5dCWxDrz+SPt4baJGDeR8ob+ON4naL0UJjjOu2WYj6BNcDWn0falwU5ZBjDdB26j4ZSAZ2BQ4zUw3e5Fk3unNCt8yN1xpT8vIRkcng0RzQI+X0CVv+vi7gdUSD04wfZxPnpXCLKelqo+vcZz/fX7nG31dARa6w8pSjRYg/MrviSL9ngsBHyoDMi0wIeqHohTul7Pl+BCO39pXi2ppTtmNX4+Cv32Sp/Ianci6OZgB1G88rYogPTwm479kUw0akduCMD87tTCDC/xJ3hfc4MryA6fke5oDcjfJbN6PQlRiFxztohgWAEhYn8bHUl5s0QMtTZdGoKgzIrTQnU3LIVHApgLzhgWqnOIcHdr6udTDJXF7Vboq9R4fNREByIQ2h4/jUHVR15IIP0j7rrYT; 4:2vOwVMOfbBwHyg0a21WpASc/tz+044bfq0P5vpave1cIE0wgnASgmklttKQmsGmnywfh92P/fOb7k1sHaTZaM2JFYCJFXQVRmWdqHJezdL48h88O/ozfadkqqzkzp7hi3RDDQqR0B0ucas0sPenbLk/02Nx2ZcsufuryeNzjA++exKbimREOqdTxKMILSvGw2WcYXjSxutoXlQtc+gtjbQbdpVg6a33mh0hBJPDj0ZMABZ9Q/RlP78OxKmBKXc5xbqoMy+Nykc/oS44+JKaFJWF3yQNiYIGKie2o2ulTXPLYTP0A0wwHV8unyq9wG0zg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:K4yL4OXHhex/ECylhqZfXwY4X6HxHSXcQo4N7+JrG?= C9kjIgMa1HC4JyZm5dMzumCNupnRtayqFq7fW5EG2EC/REHTq6nyZAd0APhNrPUl2yBVILluD3DOj67jq7X6ACdfPBsU5QzCdjIwpBiYMDzr4zphNzl11Zuq4l7v6ZFDVQe+VffgUV/YuX2dL4QtQAkjlr4t4hn9EjvqbLW0GYyJ3D+xFTZjnCOW4aT+jcy07F1lS+XiKKpOU9RKpH7NzdNLjMUOqCc5+pinhjjrhWH3DDuaHKrSWoagC5RpMfOqYg53An7iZhS/m4EkP7rluvu91xYrJKIoVxKrKsWwmnyAMCkUTwP9ZsCc7cJLzcvM4EJAe1nbH2+/fd3Z+EhVJdsbMB1kmDUw+Su7X7yFkzDRvx8hJSNeR7B04Q5/T3uwVwMuQR3qAD+uTkKWf1fo5WOyG8GZdDLZ0tFsL9XvMCnbCrRQLTUo3RvLGK6fs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 1; AM2PR04MB0756; 6:FRw8qrowp/BaUd5S9z+HeHTTyt5bCBrP0ZU0CS3IVpbh5HLfLazJEY21oGy3/LU4gszumj8RXbCDPaeFbDWSSO/9+tVAtSO2dXKmv2q0N4MAFuuaWvYXGGZZoGA6WQojh/XM1n8Wm0LCLiBtpYVItjThAiacJU8BodadurzYVmhku2NLt2RwGjfWNqOGshTNdaVI/eWQcpHB8A/qNOrHzY9RaCFClpFwll6Y3bLK6eMsQpGaScLuANDnBFgBQdUcvYIVCgq63F8NzXnxAOpZBPpS9RO6hjHP09L1tCyFrYCqs6FwA7kzW2Ns68sppuUt3mcEu5nF2kNmXXVh/mtT26OToq5mbyQEUxWWrBtBw7ly5qGJYtgaBVFxofs/dMV8HddFGVbQhCQvIufnnREnR6w8ODEa2+2gKtulyf163dW70M80toTNxVFnJzO1/H2xir77YF03nFZBg8ZKPkQzzg==; 5:lxBMVXCPwpGQNwODudp78AqKNJTM3PZ5ScMlakxNb/eNByBM2lolJ49599W8bCQMBLGqQMFMD3eKLkx48F1nzhkZ7ypuKKngkGBcNVV+pXQ0kKrrIIYvrWmuO/MJtIwscVTqlbdmdPbh1pzVD6gnfeB90b5CKMrQg30DyaS20Us=; 24:XDQcVOG60by+3QZ1M2eiM1vNNVJyYALrnFpgGpOecG5oN1+fBL7E1nh497ohZ+7Ci2XYwGEU4d8Eq745n13THFizQcKg7dsvIoRJ1nTXzRU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:DoPs6Hab4A1tkOBHWKGMKY0tMUqQYQWFY2appleUv8crwQnDFAGFF0ov60A3IJf1KvCPCaP5domuqS3UsSLWgszTc4QmnbAvlBhSQy16JhmhOIneBbYZmtD50W3f5U9TAZxyDBlCPf4o6oHRpqczHpvSg0anAGtwTQnPClnW8dOtg5cvbyU9SX0Z9KXFbjOTFfcmV1IRam+HJJY620+1g55Nxlr5FXN3utZOEPt1x8YfMuJOVUvMxxJgu+DPvDME X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:56.2547 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c844fcd3-dbce-4186-e75c-08d59e044826 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 7/8] net/dpaa2: fix the implementation of xstats 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 1d6329b2fc1f ("net/dpaa2: support extra stats") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 281483d..eed6dc9 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1115,12 +1115,12 @@ dpaa2_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, union dpni_statistics value[3] = {}; unsigned int i = 0, num = RTE_DIM(dpaa2_xstats_strings); - if (xstats == NULL) - return 0; - if (n < num) return num; + if (xstats == NULL) + return 0; + /* Get Counters from page_0*/ retcode = dpni_get_statistics(dpni, CMD_PRI_LOW, priv->token, 0, 0, &value[0]); @@ -1153,10 +1153,13 @@ dpaa2_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, static int dpaa2_xstats_get_names(__rte_unused struct rte_eth_dev *dev, struct rte_eth_xstat_name *xstats_names, - __rte_unused unsigned int limit) + unsigned int limit) { unsigned int i, stat_cnt = RTE_DIM(dpaa2_xstats_strings); + if (limit < stat_cnt) + return stat_cnt; + if (xstats_names != NULL) for (i = 0; i < stat_cnt; i++) snprintf(xstats_names[i].name, From patchwork Mon Apr 9 10:22:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 133018 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp109647ljb; Mon, 9 Apr 2018 03:27:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ancw87Et6jkw2gTMnne69p2rBNJcO99Bdi9kRCqaO5FeJE1WqzuHvnLudKeuUm5z/E3EG X-Received: by 10.28.158.10 with SMTP id h10mr17909670wme.105.1523269630891; Mon, 09 Apr 2018 03:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523269630; cv=none; d=google.com; s=arc-20160816; b=K5Kbhc7xOtEfDwD7HEXTHByS4zutbmKwygRdeKZS24vs4kxv+g4dZrM/kMhv76zCci jjGOyOQVfQZUkMqtwaCp/6IzVhIOU0VYu0kRbMy1PZeRBOqA7svM1g7aqGYJWAdjbeH8 WbfecU4BXmqrm9UH6QCgn8FpA/SFX+CJB0r7pAwbGHliFuvmmE4rVdvcsLgew0kXZ7x9 ceingf/FTT1T/T6kZ72u59L3Yum+HyWAklspUltvD0RzABv8pyI/2wLJ4++NOG3/efWC xIsBlezwmO0bpr4U2FLHZhQyaKrclbSTIh+JlDqGR1ZCIKD+c1phU9Q+t3RQIpjRMv3K sm5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=V/zkkfFstSWBvj3TXJUrkfus2TbLmlA8MhTgutKQJUE=; b=et7ZawZjqZHz6VYmz4p9hWsgDSVSnUmsKLQ0EJMa1GIKmVqbvmv0JQBwY+e3so5f2J /Tt35NEjE1VS5uZxv/dbEMSpTfk8JUase67UaOTwX49YszPVvSK7kt8rVCb8AvG/orqJ N7up7Undy+nUAiM+MbpzVlBnkpDHi+dtBfX4IX/vFxfUQWRTp3fVrie6MzEsiIajyQCO WugTxb88vR0IlRYVirx+RAY3IWE9TKF1ATZPA9C3ZIePT62V5P8LEgrYePff9/dJeh+g cNxCpHw/rXMorKChph33heP7BNHoHcC7CBTNGojzRwGVGp5bizKV+g7yNkxTodgFxD6m PDTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ORaAc6mi; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d4si206088wmh.270.2018.04.09.03.27.10; Mon, 09 Apr 2018 03:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ORaAc6mi; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0576E37A0; Mon, 9 Apr 2018 12:26:10 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0051.outbound.protection.outlook.com [104.47.1.51]) by dpdk.org (Postfix) with ESMTP id 06FBB1B7AD for ; Mon, 9 Apr 2018 12:26:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V/zkkfFstSWBvj3TXJUrkfus2TbLmlA8MhTgutKQJUE=; b=ORaAc6mi7stEeqabq4Ljb2GRUiUR5wFi3vnhkfC4AW1xRgr9gW0w9+I032pQ25180oWPeJK4EgNnsMxgxdLZDC9zTf7XlvorfgUVbMn+70TGz/agCDYF13RCA+o8dqcNm5agAW8jIpfiyoDsnwFckHrgklOCrg7kFZ4/O0jD3Rk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Mon, 9 Apr 2018 10:25:57 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Nipun Gupta Date: Mon, 9 Apr 2018 15:52:51 +0530 Message-Id: <1523269371-28799-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> <1523269371-28799-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0067.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::29) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3c5659e6-3bbf-477a-7b11-08d59e0448fd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:u36d4pdaoHC2tndkcYutCWtsB4ZSs8i+V5bmhmbno15dQKbKkiuImDNIEGSLdKmxRqFyeSNqi7+EDmqV81nEkoiT04111+Hp4Gz3T0msexBht3p5T9ZC3va1PWvXUE+fxlHDE2FYKVJbkQMvmS9QF/VMw833UHuyZyCn964dVprc1igFO/uqAlU8lZl5O61cn4rGmzTArfbwqfysL9GghM3wnf3bDuZ8h3k4yH+MwW5YmWXDxIXSfOshCLWFLmYC; 25:baM4RmAxHbc3vFPUIKeYsQEztg3z6I/eI+c766hjzsS6rpKgZ31k6XQm/V2rEnIQ6GpQ1SY/vPhtyvmxHftSQLcqArV30vceRKuc7rP0GvKN+VExgGgwzbDZFBlzb/qRiNAcbmS1CKWKzE0/9OzUOKlGwgnkcaQIVcDVN10ncTE11rUJqZN7qTs2bmieH19GbyWORHJBLDCMFvcfl38cHaPGsLkHrfjaAFvpxL/NJwNqgsiopQiNE2fEeFUGPAg2ZVq3Q35onKr1eRKz+0vZD7txpPdRHz7i7QnjGwwOhgdKh3n9xCfAb6/oe2K12Kyy8LSGzw19GDf2Sciw+ifCdw==; 31:Nm28Ka/rXkVvuaTyjg2eugdTXMEv3vZT1SXyriwvmwCCeDyaE2Seaafm3QTZAmOrgkBwGftBgRyly21zdAZT1Cwl/4S3wiEr+b0YaBegIudd1zG8M6ELIlMHFXHoo8EkRFmWh9a93WW0ohdBO6iZSGZ4m0dKHG20bhcwCyp24h2ETONW2e89oRg8SC0jVSPGKlB+CfDka7RgMiw6gC1fJTZWq/9IUAthEPYsEDFWOKI= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:qC7mL9eyThufbJ5/2H8ZjkXdKvoJtVxN88WHmt3gVc1m/Cec8Kpda70zKrj1zuvoe5MrDUhewePuFUltBDsMALAvDMWkrEtEMrBawDY6zdSvuu5tfm+v7b+hk85inqHjsUu4lvAVZlfsnxwH70d5ftqKfrR9Wz+fOGj7BFFzmN7LV1MnYLk7PqDggl8efNPEMZx6KiCh14nAPIC+hdy+1MLyGB8CAVz5gIjqrM4HWbMA2PCAt6oMwhPdyzCws6+RW8tyMN7ii/ufGn1l7D9HvCq2i+cVDrbDI7GZscB/aOfoluDbU895fEohvglDLYGoiNss18Qbzqvw59TT0ZrDtVsZS/Sc/0JSQVdlMXvjdu68/vtReRDROuGKvwbSe7qyNe7zSpsHPOZAbnluw7KHW+SuVKqUPDVO/WlcMwXn3WfjZBjdsS3Dexx1DG/nGB06FGtkMYs1wNohEmNL76aavEP16Gutk8IrcllYLxEbO4WnOOyWcZwzvU6AUn6sFNjY; 4:enK7Xlu/nXyQp+3dXSg/V6PcGyqQamkd1Xn0p3Yf2X6agnHFCdcbjpkRSrZXAOyyusUmuppNAMyWgxYwsvgOOkxwwU4W8e2j4aJQY81EIIeGEXgeEZp10G8XSPVU50B+0lKZqB+I2cP0VPF3l4Zzl+Srs/aULR1txf0XVwCGQKqa8tC24agKNaUyWPpKCgExwNNiSM9kGeq/+5Ivy1GfULmZn1xdOLf28DFQudBwO/fvDfwAtGYuXV7GGxPEhHuaqPWS5B/2g5FPzRn1b51BsheDqWrvXTgUIJKv+8kWFq8Ex8Rnf0B61lK0lp8JPwwAaioNa4Gnlo+olbDiMVH5V5jaiu2KusHt3O9kl0OJtLs+MySlsoSwSErr/pUKXkM1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0637FCE711 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(346002)(39380400002)(39860400002)(396003)(366004)(199004)(189003)(36756003)(48376002)(50466002)(8936002)(6486002)(6916009)(81156014)(50226002)(6666003)(81166006)(8676002)(106356001)(68736007)(316002)(16526019)(3846002)(16586007)(2351001)(2361001)(47776003)(2616005)(26005)(6506007)(386003)(59450400001)(55236004)(66066001)(6116002)(305945005)(97736004)(76176011)(7736002)(956004)(52116002)(51416003)(476003)(486006)(53936002)(186003)(2906002)(575784001)(86362001)(4326008)(6512007)(25786009)(446003)(5660300001)(478600001)(105586002)(5009440100003)(11346002)(83323001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:UtCGjRQ0iUj5aStIZV1M4sUGmIlaq4RlN1ZzhkzNK?= OlKypuoK9tBGZXSjbE38F8qsZVPp96urUBimQbsTdoxWudBRxQPldtqcl0abaxKiH/HeXIHZg8UtZSYELM0nf+0lA1CLkYemXhpzroonuz3epPFLRhmxcpZ1JW/aCcGP/O/F2cKRTmYgg7hcoZyyLL2C6UwwBSjYF/idcu/RRg1KfFQ0wQYmRJ4qwA3WhhYKAdC4mlmpx6FtRrmBgkxqWM8mSHcTVKVxT2h2vMZ7ZhoWeH5ZR2q8WRuPu2ZFhSNzrEPkh972pJvrtlWPOt+jqhlosA+cTGQk2AFypKefjvE3QzXqczt1L5W3wjGd6amTRycbKWGOW6oKeg3oMG3bx0jx7zbIwqggHxjSNLf8Bw4eUGtouxQee0ylwNQNsgr+h42nCRPB8fRuwUP0Ecrxi+96Ix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SuiAECcsJCNUDHUqCN5VetcUmJDyPaSe8h X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 6:XdjaE8tdGFYd9XKy+yqslYbpsVZG/CyGJpB0Inaczt+tndNgH+uz5pm7f0bCvpRJTwO37brbk1vQ1FzmkpbC+ANOdASwdd2xKmocEJgF0UuWPl4+W5Gc/IDFoWZsbY3DdAmE36cLZaBK1ntP3A1eGhO9qlUvrkf5o2PSfrefcfxz0ijbR9yBLNy3Cn6kmWt0mVJtiRLiTmksqSegw89RX9wIKYE4GJcvrbXFfqyB+kDawO06sbuub1VYPyOmlg9OxlRUl4cCcfx53e7P2PFLQkvl4C5Lb2PUbw1zp7f6RECW0KLuiyx8RrjJMXkRn5q5f9aCAdbd5EjVGuieItYoeDcAsu3uPu6JXaQ9aNJUfTpS975Xmq97WJC6ps76yEfXAnztk14a6e5LSuqKAcaQzm8ywCLkXN0zOl87xO1N+N9VZFj3FUZr+60aV5qn64+E7pNVkKXDQNgzig/6VsXlYg==; 5:R9JnSbA3X7sEiShElt0xWjDEuW7ipDwBaybHsS9DumS8xNRWwac9ypQOAdlqd/xGhBnVqhZlVC3Y+Xo804GL428Y5aUUX5JxAtos+aTFXR07+39NHA9GZ6zm8/Zo5oJ3T98Gx4mSpSkFOCCaCfQKfc7ew9xTj1uy9GnmYaZRMpI=; 24:eEz/z89/h4XWEKavaxjRhfYUXtni+Q5Zet/3rzH+ubRtgNKNoxhfkHOVy3J5KLhTZfjKOIyTlE5KefYZgv5K2flVpvLJ2jouW94dmfK6DD8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 7:Miop/ZjG1ZUHVs7Eqt5wahyT6w1rFvbUzteK9ftEGfaZ5QTmQHJ8VdzFVse+GMCmMzmV9Z8sOQQW5zm4gfzL6RByyo+50N0s38F0CFJfEPY13bUZIrtt2ix0Yn7iCamC+XwZLtD/4OzK61dEHN1v551781abID1cjTW0HyPaws77AGdZzHojBJHh5yOfIBetJOQdM+no3wEhhzSMdk/ibkpIj9Pp17o5+1R2VCrjDc9EfVpepWN4q5D46BT63B3U X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2018 10:25:57.3485 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c5659e6-3bbf-477a-7b11-08d59e0448fd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v2 8/8] bus/fslmc: configure separate portal for Ethernet Rx 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nipun Gupta In case of Receive from Ethernet we add a new pull request (prefetch) but do not fetch the results from that pull request until next dequeue operation. This keeps the portal in busy mode. This patch updates the portals bifurcation to have separate portals to receive packets for Ethernet and all other devices to use a common portal. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 27 ++++++++++++++------------- drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 8 ++++---- drivers/bus/fslmc/rte_bus_fslmc_version.map | 8 +++++++- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 12 ++++++------ drivers/net/dpaa2/dpaa2_rxtx.c | 29 ++++++++++++++++------------- 5 files changed, 47 insertions(+), 37 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 881dd5f..a741626 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -350,7 +350,7 @@ dpaa2_affine_qbman_swp(void) } int -dpaa2_affine_qbman_swp_sec(void) +dpaa2_affine_qbman_ethrx_swp(void) { unsigned int lcore_id = rte_lcore_id(); uint64_t tid = syscall(SYS_gettid); @@ -361,35 +361,36 @@ dpaa2_affine_qbman_swp_sec(void) else if (lcore_id >= RTE_MAX_LCORE) return -1; - if (dpaa2_io_portal[lcore_id].sec_dpio_dev) { + if (dpaa2_io_portal[lcore_id].ethrx_dpio_dev) { DPAA2_BUS_DP_INFO( "DPAA Portal=%p (%d) is being shared between thread" " %" PRIu64 " and current %" PRIu64 "\n", - dpaa2_io_portal[lcore_id].sec_dpio_dev, - dpaa2_io_portal[lcore_id].sec_dpio_dev->index, + dpaa2_io_portal[lcore_id].ethrx_dpio_dev, + dpaa2_io_portal[lcore_id].ethrx_dpio_dev->index, dpaa2_io_portal[lcore_id].sec_tid, tid); - RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev - = dpaa2_io_portal[lcore_id].sec_dpio_dev; + RTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev + = dpaa2_io_portal[lcore_id].ethrx_dpio_dev; rte_atomic16_inc(&dpaa2_io_portal - [lcore_id].sec_dpio_dev->ref_count); + [lcore_id].ethrx_dpio_dev->ref_count); dpaa2_io_portal[lcore_id].sec_tid = tid; DPAA2_BUS_DP_DEBUG( "Old Portal=%p (%d) affined thread" " - %" PRIu64 "\n", - dpaa2_io_portal[lcore_id].sec_dpio_dev, - dpaa2_io_portal[lcore_id].sec_dpio_dev->index, + dpaa2_io_portal[lcore_id].ethrx_dpio_dev, + dpaa2_io_portal[lcore_id].ethrx_dpio_dev->index, tid); return 0; } /* Populate the dpaa2_io_portal structure */ - dpaa2_io_portal[lcore_id].sec_dpio_dev = dpaa2_get_qbman_swp(lcore_id); + dpaa2_io_portal[lcore_id].ethrx_dpio_dev = + dpaa2_get_qbman_swp(lcore_id); - if (dpaa2_io_portal[lcore_id].sec_dpio_dev) { - RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev - = dpaa2_io_portal[lcore_id].sec_dpio_dev; + if (dpaa2_io_portal[lcore_id].ethrx_dpio_dev) { + RTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev + = dpaa2_io_portal[lcore_id].ethrx_dpio_dev; dpaa2_io_portal[lcore_id].sec_tid = tid; return 0; } else { diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h index c0bd878..d593eea 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h @@ -13,7 +13,7 @@ struct dpaa2_io_portal_t { struct dpaa2_dpio_dev *dpio_dev; - struct dpaa2_dpio_dev *sec_dpio_dev; + struct dpaa2_dpio_dev *ethrx_dpio_dev; uint64_t net_tid; uint64_t sec_tid; void *eventdev; @@ -25,8 +25,8 @@ RTE_DECLARE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io); #define DPAA2_PER_LCORE_DPIO RTE_PER_LCORE(_dpaa2_io).dpio_dev #define DPAA2_PER_LCORE_PORTAL DPAA2_PER_LCORE_DPIO->sw_portal -#define DPAA2_PER_LCORE_SEC_DPIO RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev -#define DPAA2_PER_LCORE_SEC_PORTAL DPAA2_PER_LCORE_SEC_DPIO->sw_portal +#define DPAA2_PER_LCORE_ETHRX_DPIO RTE_PER_LCORE(_dpaa2_io).ethrx_dpio_dev +#define DPAA2_PER_LCORE_ETHRX_PORTAL DPAA2_PER_LCORE_ETHRX_DPIO->sw_portal /* Variable to store DPAA2 platform type */ extern uint32_t dpaa2_svr_family; @@ -39,7 +39,7 @@ struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(int cpu_id); int dpaa2_affine_qbman_swp(void); /* Affine additional DPIO portal to current crypto processing thread */ -int dpaa2_affine_qbman_swp_sec(void); +int dpaa2_affine_qbman_ethrx_swp(void); /* allocate memory for FQ - dq storage */ int diff --git a/drivers/bus/fslmc/rte_bus_fslmc_version.map b/drivers/bus/fslmc/rte_bus_fslmc_version.map index b7db074..f519651 100644 --- a/drivers/bus/fslmc/rte_bus_fslmc_version.map +++ b/drivers/bus/fslmc/rte_bus_fslmc_version.map @@ -2,7 +2,6 @@ DPDK_17.05 { global: dpaa2_affine_qbman_swp; - dpaa2_affine_qbman_swp_sec; dpaa2_alloc_dpbp_dev; dpaa2_alloc_dq_storage; dpaa2_free_dpbp_dev; @@ -101,3 +100,10 @@ DPDK_18.02 { rte_fslmc_get_device_count; } DPDK_17.11; + +DPDK_18.05 { + global: + + dpaa2_affine_qbman_ethrx_swp; + +} DPDK_18.02; diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 784b96d..23012e3 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1159,14 +1159,14 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, qbman_eq_desc_set_response(&eqdesc, 0, 0); qbman_eq_desc_set_fq(&eqdesc, dpaa2_qp->tx_vq.fqid); - if (!DPAA2_PER_LCORE_SEC_DPIO) { - ret = dpaa2_affine_qbman_swp_sec(); + if (!DPAA2_PER_LCORE_DPIO) { + ret = dpaa2_affine_qbman_swp(); if (ret) { DPAA2_SEC_ERR("Failure in affining portal"); return 0; } } - swp = DPAA2_PER_LCORE_SEC_PORTAL; + swp = DPAA2_PER_LCORE_PORTAL; while (nb_ops) { frames_to_send = (nb_ops >> 3) ? MAX_TX_RING_SLOTS : nb_ops; @@ -1307,14 +1307,14 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, const struct qbman_fd *fd; struct qbman_pull_desc pulldesc; - if (!DPAA2_PER_LCORE_SEC_DPIO) { - ret = dpaa2_affine_qbman_swp_sec(); + if (!DPAA2_PER_LCORE_DPIO) { + ret = dpaa2_affine_qbman_swp(); if (ret) { DPAA2_SEC_ERR("Failure in affining portal"); return 0; } } - swp = DPAA2_PER_LCORE_SEC_PORTAL; + swp = DPAA2_PER_LCORE_PORTAL; dq_storage = dpaa2_qp->rx_vq.q_storage->dq_storage[0]; qbman_pull_desc_clear(&pulldesc); diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 532de94..d1cfe95 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -481,14 +481,15 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) struct queue_storage_info_t *q_storage = dpaa2_q->q_storage; struct rte_eth_dev *dev = dpaa2_q->dev; - if (unlikely(!DPAA2_PER_LCORE_DPIO)) { - ret = dpaa2_affine_qbman_swp(); + if (unlikely(!DPAA2_PER_LCORE_ETHRX_DPIO)) { + ret = dpaa2_affine_qbman_ethrx_swp(); if (ret) { DPAA2_PMD_ERR("Failure in affining portal"); return 0; } } - swp = DPAA2_PER_LCORE_PORTAL; + swp = DPAA2_PER_LCORE_ETHRX_PORTAL; + if (unlikely(!q_storage->active_dqs)) { q_storage->toggle = 0; dq_storage = q_storage->dq_storage[q_storage->toggle]; @@ -500,11 +501,12 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) qbman_pull_desc_set_fq(&pulldesc, fqid); qbman_pull_desc_set_storage(&pulldesc, dq_storage, (dma_addr_t)(DPAA2_VADDR_TO_IOVA(dq_storage)), 1); - if (check_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index)) { + if (check_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index)) { while (!qbman_check_command_complete( - get_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index))) + get_swp_active_dqs( + DPAA2_PER_LCORE_ETHRX_DPIO->index))) ; - clear_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index); + clear_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index); } while (1) { if (qbman_swp_pull(swp, &pulldesc)) { @@ -516,8 +518,9 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) break; } q_storage->active_dqs = dq_storage; - q_storage->active_dpio_id = DPAA2_PER_LCORE_DPIO->index; - set_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index, dq_storage); + q_storage->active_dpio_id = DPAA2_PER_LCORE_ETHRX_DPIO->index; + set_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index, + dq_storage); } dq_storage = q_storage->active_dqs; @@ -583,11 +586,11 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) num_rx++; } while (pending); - if (check_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index)) { + if (check_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index)) { while (!qbman_check_command_complete( - get_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index))) + get_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index))) ; - clear_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index); + clear_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index); } /* issue a volatile dequeue command for next pull */ while (1) { @@ -599,8 +602,8 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) break; } q_storage->active_dqs = dq_storage1; - q_storage->active_dpio_id = DPAA2_PER_LCORE_DPIO->index; - set_swp_active_dqs(DPAA2_PER_LCORE_DPIO->index, dq_storage1); + q_storage->active_dpio_id = DPAA2_PER_LCORE_ETHRX_DPIO->index; + set_swp_active_dqs(DPAA2_PER_LCORE_ETHRX_DPIO->index, dq_storage1); dpaa2_q->rx_pkts += num_rx;