From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20063.outbound.protection.outlook.com [40.107.2.63]) by dpdk.org (Postfix) with ESMTP id 133531BDCC for ; Thu, 21 Jun 2018 11:45:46 +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:X-MS-Exchange-SenderADCheck; bh=jTYFYMgVgx25W5ScxRyWoFCanS/M94HrBBZYJRb4wFU=; b=fwqx0bswPAHIJl2iWRw3WVvgUm/4CqdKFKKWzUuResPDDAbOnMTHKSZMAvlEZyr+/ViFTaYvj/YUJedUu2ZFpL3Ye1+MfQ27hO8sl/62/Qel9+JLoHw365cr2Q2rS+xuu0Z6+186yUthcNzh8F/3LoAo/g5TOlBp/7y+AaTiS+Q= 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 AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Thu, 21 Jun 2018 09:45:43 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Sunil Kumar Kori Date: Thu, 21 Jun 2018 15:13:57 +0530 Message-Id: <1529574244-18997-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> References: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0035.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::21) To AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab7a44dd-9c6e-4228-de3c-08d5d75bc221 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0755; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 3:BFVgjn9+xPBBKRRB4AmLwx754xhlEaf7OcrjL/cTneA7l46HVTkDPx+90B5OJC1ktN8q3LVTW1YdntyCKbYW9On4WkphW/JS0eOgPJx2VFTBok+dkGPjvjiuYqLjSnXFu+A4WE4zUdYQR3nygcQCj1ggmhBIf41jofDjLYju9e4C7sK1xy4if6zGAWlDBjmhQYACewje+WAbi+F96yPWJNTWHcvNy+2/7mcX5GVF/7f5Sx1jEpIWdBanITx6HPWn; 25:4OL1wu0l5ch21Bh8HRcx6ha6soUxOC5YwgPfOklNL7j+lp1B7qVn4EN/uloruWd/eQN9ycvyn5H/fVTc/hZkFlVAuegdM+Gau4pHq1nEZKGWIMv4S+JQv8clcQvLGK/mKOSHLsYhuVYU7EAZ3vB+QZu/XEjKiMDoVAcjJwN5ueJ1aawZ53/AYuNqRmGYBQSaRpBOKIOyF552LVazjUIU9mkEeL6CPMhJbd8RRxMf2IaBw8JefHj7oQwOkzncPln2K956z60KJe3BWMqswAem8nfsZyhe1kdwOzKTMle1oW5Q2B+C40bnUK70aafx+gi3KISIvBDxTbJ+1mohQtjx9Q==; 31:KBqWF0wCBCsPfCcGYG08ZBYrLBa13mjqAHg+9/Qq7BHDfgAQIV9rHp5BBNDEKDQIlIUbT9npGTElfOpJM7QxT2MPPloiU2Mhc2D8LCRfhLDV9Di9vbxVRvajs2mmOGbLxY3qW2xJ6Zd7U0QR/q5kXJhL5fZnzXpDAMPGQP91aQ6ESowlXG196inAXnsX2CUcpNO4OcwVJdg/SRPwcoe/EfcJxKfrjQWtkJp9I8qcaWs= X-MS-TrafficTypeDiagnostic: AM2PR04MB0755: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 20:XfBTJ+0aQ3qOYsDk2M95TGYnhjYbS6NW6h+ydC+evZMjN5LmjUL48ZSWJsmvO6uaysh5IKwuTwov3qOu3OFLNFMgq5yMmv7Wu7Yc5ucS1g+Ovv0zwwE+BOqsdTBMgI5UU2e2Agxlwd2P608ZU9YNVwFPg1L+pynOYY3edZGzPzplevM7z47Jht1AHtHKMTJL158lI47h/XaGsERQar2RQWCHdYwtMWgQUKGIh9aKDaDwWxAxui1nD/ey0THABz2A7Z7qPCnR/nNFAc8mu9HMG4gdQMAX8lZZc+JLJwu2EejCgFYz4K13SB1Qy/NDIj6hhw/LAxHYAbBQyDp/FBYRBJUm4/38jcTvHoUO0eD0BlBPVfkyWqTR4hAcw/2vg1z85LK3hGFZMTREuGhHmRIvmBjaoW8noBVlz2e/qPI5Mf8zceAAHCiimRtRjCFvu3OeOZPBXchUKnitoiPtzyNIcKCjyf63g/i7wM6KyqrboH71dtcTHClPnrVpU7mSnIz2; 4:0v4ahZwbskbTnYP1ir+iLesdcVTAowbjOqjkERIad6yzw+hG1w7WQ+e1ydnCrtlaGkt3/zIOBZboCQcfusgX7yPn5URQJMNn2P0wiT3K2lk/gnC0PQi1ntZgpSzTWV4rs246Iop0PaqRN+IA4L03/La0yzj1HQc4TaC1rmG0KUNJ/8q31CYILjJZTbXOqCFlPaWwHh9Mjo8DWzFwgvbdMMkvltXJAMzMG7tKbSyZ2FrjneiuqIefM7vTKUvcOE715Ef15pao5V4ej5vMNNoNDoTUrJdKoPNt1IIubdA6uZ1XPLzpnCsNfqU+YxKaeWS3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM2PR04MB0755; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0755; X-Forefront-PRVS: 07106EF9B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(39860400002)(346002)(39380400002)(199004)(189003)(50466002)(6116002)(6506007)(55236004)(76176011)(59450400001)(2906002)(6512007)(478600001)(51416003)(48376002)(52116002)(3846002)(2361001)(186003)(26005)(16526019)(956004)(11346002)(97736004)(2351001)(5009440100003)(386003)(446003)(4326008)(8936002)(8676002)(476003)(486006)(7736002)(81156014)(81166006)(305945005)(16586007)(6916009)(6486002)(105586002)(106356001)(2616005)(47776003)(53936002)(36756003)(50226002)(44832011)(86362001)(68736007)(25786009)(5660300001)(316002)(6666003)(66066001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0755; 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; AM2PR04MB0755; 23:xytLdzaj83pGNHjqPrk6wuHAHy4PMJrwQXLMF8LQM?= =?us-ascii?Q?37aIxdWiBCt/8BIkLDD2JddLSBwpuhTaDl8kbSm4zL0/HJB7DKr/xB93SAu5?= =?us-ascii?Q?BiTRxxVKqGxvhV7mIuXJB1y0CW0eSd+4Zb0+LUoKrvpsNU4st+MY5qyOH9Tk?= =?us-ascii?Q?QfXPamEEkBOXtju/ljQUL7iN5nYICH8wi7Gmmc83V24xH4ZFLbZZGNu4LN4P?= =?us-ascii?Q?ssQsKbsTSSIi8BkipQWtGHsaKpXHzw+yFOn+6pvscfN9+dkcuhPNPyILo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gBKNvh8mgipqQFeG9RVOApnMLs3olke8LvrvjIGl1?= =?us-ascii?Q?VKg6eTiFPqWdgpN5Fmz7dyA+HpIxmE1BGOenPkVCJBfd2+7OupfvcQqGtftv?= =?us-ascii?Q?mkATfrw1189A7l9wiJ3DyxmQjSedyQFecwJRUcLZxKQs00J6Mt0KygkbRCr6?= =?us-ascii?Q?jPAlZzQOhhXy93LcAsawj9FgqXg10yx/GuKIME7KS40?= X-Microsoft-Antispam-Message-Info: RZl8VtsTnSKbGrHv8ikG5c2sPF8QwgrFBxWgR9d1nt0YS5TSuPhZKcUosktpK/rhN6ah0YCtKQTqTDKdj6mQ3x5/M2YxauFQCGio/zSJi3vq7anW1PXEFEK+qd4b1xv8C4kHIhZCClhINUhAdgQ16bfwrwnAkFxretx+6+tm7YbNVhb60Ae4ypTehsFb3B4XwLetCLYQy18bU03u2JyQtuPpcm5ibdCG8woTHcP1PSVR7eBeUyUjNUDRYwZplLwsWrxXi3zE/H6q+wbk5Qv0F3PXQ0gyQJINM/AnLcjue9XLef1oPz7Yh8wZrMPBLLDVdGUrZbmyde/39+szWYN+bg== X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 6:SRdl+WDmAO0yuqjJAPCFf9iQfLgOtGsryap5VutQqkzy1Cm40a/NKzJluFbz6n8pC4qPYtVhY8xmVMyIpuQdEjmj9yIQ5LUDLx0Nz0B013pDCypTi7ULFsL5JyeNfl12XonqL7QO7hziSH91Gl+7r9kRU1wGN92mvFfgZF2n2Fr2zqPTPSYOo/Z2XEQQRjnA2HWEAJPrwXJQr42wJtgt47gWznlXFHX7LugvWjMJbOnIblHZUiLYd4gIz52bSzsaGzhIpwbzUy9+XXqv6YXRUfrV/rlbmrF3L8c1enWktkcWZMtvoNpi6c3dist533TBCxPOidPduATRp+a7LOZsWavgwLfWSaSRg1E6rWVT/+OmQcJStoqdfhMd2e9abFnWgK1u7bEJo/sk7aD/kKHaV4OOrMCfTXFxsOMNCvGMowzl0m+h2fm6CRXRJVcJoSjF5lxp5PIQ3uL44wJd6pNLjg==; 5:ntMxHrPOkt7VESdjnY5ngANo7K2eBfoQtrTDgb6OtDvqJ0Q2Eo8uI1EyRMeKwWYXiaeMP2sJ6HMH46hVE2IFg+oxbEq3pvaafDU7SXNggAhnn2AoRMt9MVf+4I1StNCD7lEiFb8fEn0qWWAfrBdVdcScpDSinlE11klqyiA/ohM=; 24:D16GWkB4YSuNjYXbHv9W55iD+7TcqFaMMW7OXLOzSDtpjbmuiR6tS7mrlvsBHFNjiGPyHkm0QOoyfWj+m1oXq+Oc3uhRmRuGQPWBRv1N0AY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 7:2rG3X4aWgBjdG45tXquAMiqRwY9IujccvfcWcu3elnJQc3UqkWht55tQ4jvLc9IS2zPNnt8iE5ESsXYzbo2CVH9O2BjjuGPD/wRRBdb5InJBbAn6vsjzV7T9VEnju9/LhDTzLha6cWU7tiLx2FFG9peWTd0HBoYHYt+IqlUHUsJMVReJR/qt5ac50TSXwkGTrsE9nYnKCKWENIRxTaQaS02unOrS4Kus5xLQkMlNdueRcJjzxfQXC/oab5SjsqU5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2018 09:45:43.3121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ab7a44dd-9c6e-4228-de3c-08d5d75bc221 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0755 Subject: [dpdk-dev] [PATCH 03/10] bus/dpaa: optimize the fq callback routine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 09:45:46 -0000 Avoid array of fq as packets are dq only from a single q. Signed-off-by: Sunil Kumar Kori Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman.c | 15 +++++++-------- drivers/net/dpaa/dpaa_rxtx.c | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 27d98cc..13c4315 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -1058,7 +1058,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, struct qm_portal *portal = &p->p; register struct qm_dqrr *dqrr = &portal->dqrr; struct qm_dqrr_entry *dq[QM_DQRR_SIZE], *shadow[QM_DQRR_SIZE]; - struct qman_fq *fq[QM_DQRR_SIZE]; + struct qman_fq *fq; unsigned int limit = 0, rx_number = 0; uint32_t consume = 0; @@ -1092,14 +1092,13 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, /* SDQCR: context_b points to the FQ */ #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - fq[rx_number] = qman_fq_lookup_table[be32_to_cpu( - dq[rx_number]->contextB)]; + fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)]; #else - fq[rx_number] = (void *)be32_to_cpu( - dq[rx_number]->contextB); + fq = (void *)be32_to_cpu(dq[rx_number]->contextB); #endif - fq[rx_number]->cb.dqrr_prepare(shadow[rx_number], - &bufs[rx_number]); + if (fq->cb.dqrr_prepare) + fq->cb.dqrr_prepare(shadow[rx_number], + &bufs[rx_number]); consume |= (1 << (31 - DQRR_PTR2IDX(shadow[rx_number]))); rx_number++; @@ -1107,7 +1106,7 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, } while (++limit < poll_limit); if (rx_number) - fq[0]->cb.dqrr_dpdk_pull_cb(fq, shadow, bufs, rx_number); + fq->cb.dqrr_dpdk_pull_cb(&fq, shadow, bufs, rx_number); /* Consume all the DQRR enries together */ qm_out(DQRR_DCAP, (1 << 8) | consume); diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index 1316d2a..805bc30 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -431,7 +431,7 @@ dpaa_rx_cb(struct qman_fq **fq, struct qm_dqrr_entry **dqrr, } fd = &dqrr[i]->fd; - dpaa_intf = fq[i]->dpaa_intf; + dpaa_intf = fq[0]->dpaa_intf; format = (fd->opaque & DPAA_FD_FORMAT_MASK) >> DPAA_FD_FORMAT_SHIFT; -- 2.7.4