From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) by dpdk.org (Postfix) with ESMTP id 42CCA1C44E for ; Fri, 6 Jul 2018 10:12:05 +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=DF6V9T3FvcVErTEAuA+ewU/DLm0PowqPkQH73+gH8a8=; b=D+q9UkMKs1iDGzYq6n8YkxybuuT1q4nWqRvHdsJ+Ls5bzlXtG8j4s8GZU5J6eOUkrs30lZSMX6NJndPVmWz1BM1AjrVEs43HcEfZgSrSdlFuw0FzqCgi+pLh6kmXunYnGeaBSmY4LtxdVg12hTbULieIVF3UUnTeU0aEAMXJLFY= 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.906.23; Fri, 6 Jul 2018 08:12:02 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: shreyansh.jain@nxp.com, Sunil Kumar Kori Date: Fri, 6 Jul 2018 13:40:03 +0530 Message-Id: <1530864613-11754-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530864613-11754-1-git-send-email-hemant.agrawal@nxp.com> References: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> <1530864613-11754-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: PN1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::16) To AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f48c23af-59bf-4e6a-13d2-08d5e3182857 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0755; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 3:tERCuhXcUQHqikyXKbguY8rIh3nMC6HQtGnaQ6CQkupccfbVxw47ah5AVn1P5wEc4U8gj5vWxLrt+jpKxa/SSG6QlzajmR+tzYrrl79Tb1AWXelwQdUO1nCWIsl+xM1Fs6ROLgyXZxIgDqAQJZPR8AFVMP35StfSmV76p+NfS8YeH9jknWtl+QO0PdxOASdLRgsuD1XMbr9N2FePMTQ0Icq8e38KdQuYch0QadEaJDoo3hDAoiGBYAzyRZ7+kd6B; 25:4en2eGMJqD1ycYMZYiCyc2BEKwopKsTbotx6j8kmXD+z5xZpdHjTcSzRjqA8azluDipXXy7S7A203XFJcYYphJsQI4+as5WEbeqhy0B9ilaciRZt8aNanpz5ExAp5s6JbFFIPgi34MQDd+k6CUUXppy8okLMvS3LDZAskCvyluDyCcx750RHddMYpy8LgnWJz4VlVVkkMw00xnTIEmq7GQc6CwnTpn4bc6wLi7NuSsJuathhAh3lm9v++lPcW0MCVNd9cMzDvTLRL/4xvmXQ4rmJTDVq6ax6XAh/eVKPC0wUu+vvGvJ8bNg3WkhXfTbQFGesdOuDYoAZ8wZ/5Dzh8Q==; 31:pIRqBJ2ixrnrd5sBvhOasehGeRRY/HAqaSYkXFbwx1SS+m3Aakddr/Mu6c1hvUTCtmCE5X3rTuNEnfH8Tftkb3B/R3LcigwN1meXiJnHTZOpvKwVaDCdIDg4DiDVvXCjZctAs6eL/QmYO4ront+wDAmZ/pSGirMYhdXkiNln6Xspxt9jR+mdOD0qVyuZDwyPVHeQlcfgleXn9rrVknK+SCRNWjMOzNXZ3aekXzPUwxc= X-MS-TrafficTypeDiagnostic: AM2PR04MB0755: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 20:5qx0J9tLjfcdCto8h/9bnDj6HIlYIO0YjVoysOPZymasWnG6UIY1X6x5C61wNvaHTrskpUeHHqoywxePV7acuOCa4PelT1jnEMNQNcRq3RkvWtLC0hdDzQVD3EaE3Y7hKvOTVE64moWEkP5AjbPGear1fdxKwr53B2Xf4VTEk2W3znU69l31AXzJkgC4NcBs+hpxbdA+78lpoJ9hze5dlLaDToov+XuPWjHxeDFlXYH2UnhdrWrr56xHbomapUcaElMrGRriGZ3fGyZ1hvQ4KL2Q3V8bqfltrheXCW4mpEcVRan/6/SyvQTRv8ocfWEtXY0z4K7vAQMPAdKUDyOfPSYvzRdomwpV3R8S40TgKpKXch2rxPBNbnc4ohvECBE+MrLvZn9Q2U9GyHIKo4cdaxGha7iHRXiCnHxKPZxDBElDhUVmz+QCpo8asSCSuXefgiK4+3osApuS+Oap6IRFrA1h3xyHCz2LRA5ibiRyl62bqUvZLA+nGfgDhkwd69Ip; 4:ac7Ha9W1uLu/HfBqI7e9WP3J7iawT6sXigGJZ27xzY5yPT79KKUSCxMCEW92ixVbRy6AweFkcWTwwdQSeCu6V+RSezAYysgURi6AQFqDFBjEPNZc3r1rvgbTqdihD8bg2Ukm+JeaVtgCy17eKrKmgkZrFNsIBJg+xpe6P1HMOQ886O58UK1Ef4EJQ5UR3HuI5dItNOkjuUlqxBIac6agkfLRR6WZ01BZePAMxyGUxck9NdXEMbZrtai8rHe3awZVqqb0khPCZlSfsmHr8jQb8PMvgUxgFKWGothcu9idgyxmfJlIlyf5uhyEOHFI9hFx 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)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM2PR04MB0755; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0755; X-Forefront-PRVS: 0725D9E8D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(136003)(366004)(346002)(376002)(199004)(189003)(956004)(66066001)(446003)(6116002)(2616005)(476003)(5009440100003)(6916009)(76176011)(186003)(16586007)(14444005)(16526019)(105586002)(478600001)(86362001)(44832011)(106356001)(3846002)(4326008)(486006)(11346002)(6486002)(2906002)(25786009)(305945005)(47776003)(50466002)(2361001)(7736002)(5660300001)(6512007)(48376002)(8936002)(68736007)(36756003)(97736004)(55236004)(6506007)(53936002)(26005)(51416003)(50226002)(8676002)(2351001)(81156014)(81166006)(386003)(52116002)(316002)(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:vpj9dw+k6EVYYlLcI2bylMxHM4gmi/AznnOiOAcxi?= =?us-ascii?Q?V1bqXt4B4xyLmvajC9NyaBDCXzTtui2rcr8kvyw7uu8SnB9mL4M4JGbm7wgd?= =?us-ascii?Q?nnKjZ/B0F1W92UTcNqKWptY7tlgI/K6byjhqf/+yUJlSBW+idbWO7UqgHQOa?= =?us-ascii?Q?0hHwar8mw2BUJ3c1Pck3ZcYupukudcUOKT731nN/aw4AWp0XYmUKB6ByjEMO?= =?us-ascii?Q?ONxJXqEzlrXuaM9Fr7/wWWzloHXmtSD3sbxj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TIFq+r1KPYl/uzebG0qa8P64QZRRUPHryDJsTyU8GmSTA==; 5:0XASjmLZvSKJZfGDiD5s8nb+p6oFNGi8BKnaTkYd6nIuILogywspu94jXrJyrF9JUP2CQnCGcAN/Q2uyo+p7wPZGW/427HpLvCAP28gA65he3Z3+9xZuKK+OtStjLFJ7J2tSIFAriPMaW2UD+RU+zxl1cddh2nzoOOKOQLmvGs0=; 24:zXyLO5s83IpC6Ogbls3kzVAJjlJr/g3fo9GHM5TW7Kv/dlOBVhO/sF2IYjCmK6PPDXIXsiIaHI+vIcMjf8O0uyxlM2UDJzTs6d9hPw3yxoo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 7:PqMcOzJ7h5bVQRp1k6h2ycVUAFVU5VR4gle7AjVOTGn/XBtEtUaYJYP10pOHP/2qIDXdj/bk6A0fOeWxTg9yZwA/6aYsxF9xUzVK28uIeo72wz4LhUJPAF4F/2413BiDk2mp2lAzQnVoSEejllp+6voabmNl2BYBvKpd7tKRa/0k9vqaYRUME64W2zmrlUEJhQK/bLthKB8u5C/NP8JwXgJuBnsZj8nFi5Fih0SXzOr9pxul55sOsNBHSLFDrIHC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2018 08:12:02.9522 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f48c23af-59bf-4e6a-13d2-08d5e3182857 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 v3 06/16] 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: Fri, 06 Jul 2018 08:12:06 -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 Acked-by: Shreyansh Jain --- 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