From patchwork Wed Dec 13 12:05:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121746 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5383776qgn; Wed, 13 Dec 2017 04:08:30 -0800 (PST) X-Google-Smtp-Source: ACJfBosC8ccd3C4Z4sj2tJAagsFqrRkAS/yOKEKvNXNc0acW3BlpMqYcDsQfQE1eNfospfBv+CTp X-Received: by 10.28.109.6 with SMTP id i6mr1746165wmc.108.1513166910273; Wed, 13 Dec 2017 04:08:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513166910; cv=none; d=google.com; s=arc-20160816; b=UmPW+wlJAeH8bSkUiBa7NXQ0tUbbbrQZfCl28MC8taYMU5u2T+TiMol1cEePQsHbl0 IhLDuu3k/71TqiZwNq26QRCthQPgh7AooWbNBVAJQZ2lVumMfD+TQBHdrxOxLEqQm8Ir /gaxE5m/YHvO+OIoLS1KpZZ/VDuQxowWSBoCUeg12T/iidPnJXk3NBRGpzbLRvFJ4k27 XR3B78DTZOw7SKgzmDKCiG/VvQYwDL9Wmx/oAEi4jhVAF2cWhdn6tes4hLHzlKNg6xbb OZf9HJhIiElhYLI2olpeQU+RR2fY3n/1e+aVSlhr5tUljlnrSVKkoXXYuf+Lwld7KOw+ iN0g== 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:arc-authentication-results; bh=tVl2msmFxrbAdjDEE3hPV4aw4zmsuYmxm7tlXmAKnTA=; b=hI/1M23HzmB0NU/ANLCg4b1o1Yy3We7I7Hea8IJPvMMG7bb/HewnVgv7BL/k2W8PHv H4+k++hw9V+92mdN7GUlO4ObjreQwwStIPK4ZCCwgaNQdIAxKww7IXlpiyZ8qF+HGBsu 8nhvmc9cZSc9zeuk+V+xc227Ymclnx5+gu0xko8kUtX2GiJx17E5dAtj1jB4WvH/FLk4 hh4k0gIrxGEHTnkuz65UlhBWlk9ni3JEngJI16pBLsmFFxcV/0FJrfj0vFX4N/2xXdLk UNkQ5fztQ+CmfoxxHP5YKDCuRRdgC56rk2ii5txNtuPW44JH7fM0NlIPCY/Ul1caLU/M G7jg== ARC-Authentication-Results: i=1; mx.google.com; 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 31si1321887wrw.465.2017.12.13.04.08.30; Wed, 13 Dec 2017 04:08:30 -0800 (PST) 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; 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 805981B19C; Wed, 13 Dec 2017 13:07:16 +0100 (CET) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0085.outbound.protection.outlook.com [104.47.40.85]) by dpdk.org (Postfix) with ESMTP id D28111B18C for ; Wed, 13 Dec 2017 13:07:13 +0100 (CET) Received: from BN3PR03CA0112.namprd03.prod.outlook.com (10.174.66.30) by BN3PR03MB2355.namprd03.prod.outlook.com (10.166.74.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 12:07:12 +0000 Received: from BY2FFO11FD008.protection.gbl (2a01:111:f400:7c0c::103) by BN3PR03CA0112.outlook.office365.com (2603:10b6:400:4::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 12:07:12 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD008.mail.protection.outlook.com (10.1.14.159) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 12:07:04 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBDC6t9S008652; Wed, 13 Dec 2017 05:07:10 -0700 From: Hemant Agrawal To: CC: , Nipun Gupta Date: Wed, 13 Dec 2017 17:35:49 +0530 Message-ID: <1513166759-13466-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> References: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576404250725125; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(7966004)(346002)(39860400002)(39380400002)(376002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(48376002)(305945005)(356003)(106466001)(50466002)(81166006)(53936002)(81156014)(105606002)(2351001)(54906003)(76176011)(59450400001)(85426001)(51416003)(5660300001)(8676002)(8936002)(316002)(97736004)(498600001)(16586007)(2906002)(50226002)(68736007)(4326008)(8656006)(6916009)(2950100002)(47776003)(6666003)(86362001)(36756003)(77096006)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2355; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD008; 1:9SgMSzQKrItn4oC1cQV80TMs30ZHIdHV1c/J1LS0L2URdsmxwCzdJvF6QHIw9vW1hTtGbpjTTIJlX9642sJod8Vt1gRVbIAwRaz7moZ+pJXXzcg+XHFcVWvgTRFm5LIu MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a38773db-0e38-4f2c-0b05-08d5422206a7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:Ivno5am1W2rugg2K8VHRieJTkEEe/9nFSKRDfPjXcs9ob4iutWDKD1X3+vOCRAF+fui6JGQ9LhhO3z42Ey3Voq4hJ5e7CF285sEPWP9atYjC3EyEd1wUecv/qgpHKsA2jCscZedSE2LJSm6PrXyUJWp6DxmsYQr2jipPTfINgbrNHC6aPcg/l4tufgV7rz9dm0Fwy393b1ojYk+OMQq8MOMsCCnIqrJl9+3TylhCpD8D9tOokBI4b5PDvJL2nuHLe3S+GIz1c7ojwtMyKPsAwhLFUPS9m3VCzPc+EahhMKMdnxcB/ad0yHOHjgjCXsH3h0jXhY1TXqtAoVgV6xSdJZMnJNsHSaXjmwKpTuPazVE=; 25:QEQuqC6+TKjOramAVZ9uT4U8hR1yctIhaWhCqC2Ugoe4RRj4AEkK53ER82HyNz5a+LKYX8sNaZYYLvqUttKDefgSIdIokEOrqfLu8CpvV7j5l95N+xmwQ8/xtdaXQCbhack0g1NDpCKTjrv5KrwPgLtJzmG8f8cr5OsguUkD09yw6nIvrdBCu+J4TsByji6TDJgHbyuvgCMJ0vOFCEupDlrsTYEFCA+tLhbwYN69fXsJHhBJPS9ij3DH7WVd7yHsoh4ZQNEn3uZOzJY0DnjACAXYxmVl5zNBpVrWhcx6dA2j3L4Q4t/kwY67HSQzEZ/eMKTCL72r9PYvalrON9wRXcafmGsW7CZgTDp4fnnVJWs= X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 31:73Hiznv4FvG0FQ+yTBJ6y6sLNABMBUryBbZq00wwaTR+m+8BlhgMmMC7HdyQFkERyBOvHsEzkS3sgJWxEBRKuTMaXzd5W6dpbeqyTT6480XntOBy5kfTNkaGLOgK0Urm1/YN1aM/glKyS1S+2YaK069G9Z99ckCdhTFQfTYhDHkTNItAZQ1Q+uJEnr6dJx77jbPeyS0hlFiuxC7K6mc3C3ZkeN1y16oXP+1/KD9wiGI=; 4:jRhbnBjcenZCm7dBOSyX6ogVBnbvrSn/aEf/xTFoSlLIQMjnPKwu/3Gh1AgLTaVxpDJuqtAKtDKs4vEP0L5k2V2BPSzGlF22biueLYQ2b8zaf58NIiWexzKQfF4/nwP4X1pKKg3L6GehtE6GY6ib0PARHN0uWlU9KTZESP0s/GwiNZ9f0+0rlIjrv5vfR458WFW3hk2AOmghA/bK0ZADbH7utvgw1YA1VtUiWGnZ20RGJlMuJN0Qa2Wmwd5zJ/rGeKHskfIg6uDfb7Z8TawZ+/XWMVVZihIKmzSIioD2OyiMKyfB6qekjQA7BZgp8OB4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231023)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(20161123559100)(201708071742011); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2355; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2355; 23:K2MRXX0Vv38XAYdTidOr9rMKUSLAOGY3zVS4oVNwF?= om1CdBdCMpGLt53a9wleJDGWQedLGbHkr+98/Nh+GtAbRs+wMMyHum+VoCUBYu+eTvnZOk4fRjAeVIrIoJy7IC/T6EuBC8fLCYGiIT+fe8v+9QIxzuROzgBx2OqPVadA7nixy0tK+H8PXIZO033uguR5BLaNy7kU1YVYwbJwYldM2ca6GedkzEvJ7vDw4VgI1kKPEpIw8UG/VN0mqlqvNMmN5lAq4YWWow30M9XesDXYedSK4okn8fOnGTeh8kQY+YPidp2vOhcFr+OIEK1BDI/qtqLoS9387Pbz39QJS3FjxskrdZcb5gGwc/le02a1OLCl9//kDQ7AsRw6iTiEC/v1NyZAdvRnmXdiuZ9H8lxe/4GwvT8SylUh190q0WYVfDE1OaBe9H2Gpu5mSZPBa15GVQnaiLUPc6zL0Z2FF6lOVNvOPR7gu9wptoZrFb2eGa2WsriG4ThVATJKLkPOFuKsB6GF72xqpc1ChaKRCT3/Rs7ZMrry9/DLHAqEg0luIA1X/GTGrpgCRYWhuzsdBB30Kb4+1S6i1GOnR3jdFkz6MerD6DXqZOaHbY9Pxv99J30EPHlZ5oVu1x/tvpRWYPDtJMqLEjF/awP2zyv2SbSm+dQvrqg5jhYmoEIqv7t0qli/mjteRDJTKfp++pdkwSpkFg0tjqoqWW7yTOufYWdhCl2yVH1c0VWZtyspKgDGYdJjzNmJFPaN94JcFtFzJR3EyO0Z9opLB5VpxpQkD4lJ668aaO0wiiOUL4vSvDEQzaB5PqjB5mhjFnm2BCdQsH1I7HoM+35sOowwHYFrlm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dtR2T0dMsJVNjq4UecP7M6CG+rufdLgR/THQRrcQuedLgLv/zWopu1fkaT8MBJRpaaW7YmVel3E5i4DeijigWGH0B8438OONNiqTlrClFkf0vk+eoYV5RVE79pC7Fc7OhO3f40qcE6Uf8L3YlzzDtaVDSaHm+PbJx/zYoVPOC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 12:07:04.8697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a38773db-0e38-4f2c-0b05-08d5422206a7 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2355 Subject: [dpdk-dev] [PATCH 08/18] bus/dpaa: optimize the endianness conversions 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 Signed-off-by: Nipun Gupta Acked-by: Hemant Agrawal --- drivers/bus/dpaa/base/qbman/qman.c | 7 ++++--- drivers/bus/dpaa/include/fsl_qman.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 77e4eeb..400d920 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -935,7 +935,7 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p, do { qm_dqrr_pvb_update(&p->p); dq = qm_dqrr_current(&p->p); - if (!dq) + if (unlikely(!dq)) break; #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ /* If running on an LE system the fields of the @@ -1194,6 +1194,7 @@ int qman_create_fq(u32 fqid, u32 flags, struct qman_fq *fq) } spin_lock_init(&fq->fqlock); fq->fqid = fqid; + fq->fqid_le = cpu_to_be32(fqid); fq->flags = flags; fq->state = qman_fq_state_oos; fq->cgr_groupid = 0; @@ -1981,7 +1982,7 @@ int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags) int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, - int frames_to_send) + int frames_to_send) { struct qman_portal *p = get_affine_portal(); struct qm_portal *portal = &p->p; @@ -2003,7 +2004,7 @@ int qman_enqueue_multi(struct qman_fq *fq, /* try to send as many frames as possible */ while (eqcr->available && frames_to_send--) { - eq->fqid = cpu_to_be32(fq->fqid); + eq->fqid = fq->fqid_le; #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP eq->tag = cpu_to_be32(fq->key); #else diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index eedfd7e..ebcfa43 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -1230,6 +1230,8 @@ struct qman_fq { */ spinlock_t fqlock; u32 fqid; + u32 fqid_le; + /* DPDK Interface */ void *dpaa_intf;