From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0067.outbound.protection.outlook.com [104.47.2.67]) by dpdk.org (Postfix) with ESMTP id 3187C1B574 for ; Wed, 4 Jul 2018 11:45:32 +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=mOyke96XtAmXZY7kzQkZ7FvG6WXHqb2nM8CWq2xjuoEGsl13mZjyOazel5Gf+zi8159fjyG0vMak9WAvr+ls0Uvo8dGu/+fHmGNAWqDtgcdG+DkhbjawFy9BSYRyXvYLrOk8YOi3QbRBaZLKtrIRyKmoSfdMW0s6QFl/HapdhdY= 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 DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Wed, 4 Jul 2018 09:45:30 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: Sunil Kumar Kori Date: Wed, 4 Jul 2018 15:13:41 +0530 Message-Id: <1530697431-1244-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> References: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> <1530697431-1244-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: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8f21f1f-7ac6-4251-8ce9-08d5e192e1b2 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:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:1njREMHGyZcwieHJOgBaakZaHjRabfF3DQ0swnmPXlCEDTlq3o/wDsAtnacgiXwyBFDwsU8U2KmCir0W9wOcE+WcfyUaPO4TRFtj36T7Dz/m/cQyOhGQzg9Ho5KRKwqIAAPDz7VLziA495rbe9c3bKyXsPdVjt1OT8TrNMvUuENSIQbSbosygbp6Yju+3uu7NMxYpvN52gPp763/l1MhF7fEmGl/Kkv0jTFitIGwmViLDFkNKheRLmolDuj1ugLg; 25:+njpJpD0lTdSUj5GDdxhyISC4zjtgcyQRk9gQhr8rfpmERd34hC6HuRc0bPFDPvoLQ+X+YtxJ3anbitu6ID44CiU5aank4mqZDpkjPArr9Y17ZRQG1UoN6r2sUb6c90nYNTITZ2c7y0jC80SgPj0oOeKlzNly9Emd/vAq9IasiLqaPt5X2oNATyIMZ2QL7LYeY8c5sUbezEzadQHFMSZB3T5WDTJU1DyFT50N5IFnk0BGSE551xtf+TpXmxUxUWvhrl1rbP0YcdfN8heI4G+hWGnLUTFegADNinUA2/ZbDDjFG/T/5PDD3b98Mbnf1fw4E7V288kN3YRRl69gSFynA==; 31:G67VtX9U3CwW1qWYQHomNaWkeIyFjrGznPe9SLdc5u/QDG8NBhZM5Vj+wamOLZ8Njix9wGQPuOWAg/+2uIQbkUyUSVQCyt2Z/Oe5dWcPOBDpMbx6Z7OU4EHDu6NCu36SzXVmn/pARfoymM70hFBJkW/ZKjzMGzmw3eYZPEEMHbu1Pa0XMFb0rW30bZV8ps74WXZJ2y1CCmiH0q925jlYb/g7q6p63bM4/AvCWkhOuME= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:SVHzyXjHOIFzHXpUFVz8wNtEougC3rZEOovRgDByo9b0Y7URDDoeSzcfRflzgIR0HD/EjjBvaTjTfqvoCr320sKzPSLlbgp9Bb0dH9kjXXgzbDd0Dlh9RS2IVeSZCI2XP1OUzv5FOFMHiBrPXaSNWYoZm58F7nqYXYg6clSTLdCZVi5PdaRoIMJcrngRVjhxvIGI5B+cx7L7PtDPUYwORV7skggHIsSiV9qCjQbAd03TxoTmOqYkjuEJs1bSZk6h34c/oLtFATgkS2fka1qz1yqiBYhAtKgStf4Q/jnyirSP935LlJJE+j6tcl9oTwkkBpLXf4sdEQtpWpcnH6Nmzz/5XZDf6YvUbk+Ch9ogIQe+qS5KFPtu4SBceqVw9sQD/GMRCHnciKCc1Kgrz3v8FPdj/UqpWRfYZXVrKaqypciS6d8dbR4f+14C0nbYNhIzI4jZkPC43fOOr7ocjdyuGKsA92FrDdf+MghTucv6271RwGBVgyieB9C1oNVYTF7M; 4:7vazNcV+C+j5GL5ee8HAkJzbiC2gZFF1VGo823MRzw6348loLQ2gUGbLF2lLUkGh3/Ojr7N17h2Wn/akFgFJ2jH4nJJaFnkn+71DGWoMDD6qp4a/yfWBQRMsEBrr+PPSVcTwwA7nhdd0SpHMCv1iwhR2YomxwrMy90gNHnIcgbAogTF/gcVQnqYOpRBLxsJLSs0INQ9C2gqdKpa8TmV3BKbaCNGiYDN3PE4RuQ1atekjgNxY9vfMKZl4DTxQMJPSqzYWMj1TuGIOQ68lW2iHMS/DZe57Jw2ZYuIyuc+PokyAKQTSi98us/SKTkp0GEyE 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)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(366004)(199004)(189003)(6512007)(11346002)(476003)(386003)(6506007)(4326008)(55236004)(956004)(2616005)(5660300001)(44832011)(105586002)(68736007)(16526019)(53936002)(446003)(50226002)(316002)(6666003)(5009440100003)(36756003)(16586007)(2351001)(6916009)(106356001)(14444005)(186003)(86362001)(26005)(6486002)(97736004)(305945005)(81166006)(7736002)(8936002)(66066001)(8676002)(478600001)(25786009)(51416003)(486006)(76176011)(3846002)(6116002)(81156014)(48376002)(50466002)(52116002)(2906002)(47776003)(2361001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; 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; DB4PR04MB0765; 23:wa0w91XwQZLN10azsg+beuC7/iEKK/OYrhsFtIySa?= =?us-ascii?Q?lUSAySed6edLFxXjhGaReficYvWD1yjTrWaj5jLOEnN3YrOtzxi3wP8QGC1e?= =?us-ascii?Q?M3xiWK/oK0UFfEGKR0Jxag/3jm1WZTGp3eevBk0381anKHfPEt3juos8yxDo?= =?us-ascii?Q?1Q+2dRkUkSCGAVNtH9FK+NPjQhpoSzB1KHJK7W9nC/+ZWHvLixT0Zqb3G5dn?= =?us-ascii?Q?ZeMcX1p381tQ0Fm4eAc61nh3iFb2QH1j9n2CATUYnWT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lEvWehxkocRXAzP6GzqH3vCMm8rbc4TaxiGLX+E7GvOm2tvRSS7cQ==; 5:UdROYKaf84zHM4Lfo+YFSY6VjJIZkOZ8VGlGTZPXH+maLYNZ5NuyOw4HOY80I/KDPBk3Id7qEvvfkYHgHD2Ft2NsePM/vUKCp9UiZCjir0QdRcYxSsB73ywmeUq9YASM5KW7Tdfz+YqhdfI4BTFt1OHxwBXbPCItUOVjOTEnY1w=; 24:T8CL1ToK9cSrwt9d/wqPQ4SS63oZRO3vETC0lzkEo8b5HH2hX0S/EHEDneRNfQC4gySpJ9BHV3HHSMtEb2cxD6MhOh0NI5fTp3ICHs9tfDE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:Rj+QCwzemhPShp5w74mRWq0t+vdHJOliqQtc19uYR1xsJ1dpqOi+JvSixae21TvO79Me+7rMToAO7VjxxH/R7zIZX/uYUi6LTB73rWo4iQTb4jer2Kin+hXqSVH1/IIuolb5Z3Li583r+xFkx7kzgloX2LdNWi/mtn78uD2gVezHuCHjypI1hRtnGpilzpBHUh+d1cr3M5fA5fMbrPB3cJ8SGTeK58qR73RKHVHj2M77YD4mJR7M9VVqKNBDuGFa X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 09:45:30.4778 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8f21f1f-7ac6-4251-8ce9-08d5e192e1b2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH v2 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: Wed, 04 Jul 2018 09:45:32 -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