From patchwork Tue Jan 9 13:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 123946 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4019706qgn; Tue, 9 Jan 2018 05:25:31 -0800 (PST) X-Google-Smtp-Source: ACJfBovaZopcwDZ6DkM/CY3KGphhTMmrSU6h7NWiN1hccGGUuj28vf2bowoTKNPutQwXtWgT3UBV X-Received: by 10.223.151.41 with SMTP id r38mr4463875wrb.133.1515504330986; Tue, 09 Jan 2018 05:25:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515504330; cv=none; d=google.com; s=arc-20160816; b=UpoLTBVKO/6SHeEST0EVPbXNpwOf+t+pOTPWikYndHi0Bs82KIrClgfPuwl0e4ye9Y GJhpeMLprZOCnbBMjsEiKQapdZHfEvCVrX0SExbVzMKSGV0EiD90YdY0EdWQFFjYI4J1 xjAuh3fjal5dWJUJJJTzhko3gTqPyV8koc74uY01NIvDTv61unQIRHHWtZo8w+nzXVUb 7+wBGlpjvtDEXfPVDLGCXy6hnqFS7UhM5YNngMXpzmQ+TDLyOSfydD3Rh8MJNrx0wlTq 4Ykj7buN7ZmUo2NeLIdkdG0B62P+nDNCx7H2w7IpkTClnh39jOsHcgDjze44y1UEhkez Rd0Q== 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=XPq1GzVkilHW3M0UKivqGgujNvD4mV6NDRerPZ7bmtU=; b=o25ekw14YsBZzJ2pPiUnUv9VeQtn02RYwXoE0hSAL72XS7JAlf1tl1d69yjEQVZCGL bQPtNTNHO3desYrbQVFfCMlhm2jxvrZwLK082OLe+zxSFvR4YCTjgYowcLRQm1dkw29K P6VPvo7DpfCAr2WM2brkEknNQ8Kb4jdEBsWKOO22aZCCn8aMoStbRQ9VU1QMvifmLdxI yCLIiSizP4//X6syIWqECd0ObySjQaaQ4fuMMJn1tdXEgq0XaigpOvE+yfCJ8rlsi658 S9vEYu/4u78be90HNQI2BH2vqYHd9CgARNcE2fUiU/bZr1Zg/bWIFp+EMvKYuEsdisoj oLCw== 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 18si11070648wrv.418.2018.01.09.05.25.30; Tue, 09 Jan 2018 05:25: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 695211B1E3; Tue, 9 Jan 2018 14:24:34 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0065.outbound.protection.outlook.com [104.47.33.65]) by dpdk.org (Postfix) with ESMTP id 70DE01B1AB for ; Tue, 9 Jan 2018 14:24:30 +0100 (CET) Received: from CY1PR03CA0001.namprd03.prod.outlook.com (2603:10b6:600::11) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Tue, 9 Jan 2018 13:24:29 +0000 Received: from BL2FFO11OLC004.protection.gbl (2a01:111:f400:7c09::124) by CY1PR03CA0001.outlook.office365.com (2603:10b6:600::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Tue, 9 Jan 2018 13:24:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BL2FFO11OLC004.mail.protection.outlook.com (10.173.161.188) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Tue, 9 Jan 2018 13:23:58 +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 w09DOAVp017638; Tue, 9 Jan 2018 06:24:26 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Tue, 9 Jan 2018 18:52:55 +0530 Message-ID: <1515504186-13587-8-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> References: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131599778390729436; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(396003)(39380400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(86362001)(36756003)(6666003)(81166006)(8676002)(5660300001)(6916009)(2950100002)(81156014)(97736004)(4326008)(498600001)(51416003)(76176011)(48376002)(53936002)(85426001)(104016004)(8936002)(2351001)(305945005)(47776003)(54906003)(106466001)(77096006)(50466002)(50226002)(16586007)(356003)(8656006)(59450400001)(68736007)(2906002)(105606002)(316002)(296002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC004; 1:skt4KRFRE7BuUdK8rPfZqxvg+EfuuMf1yXmgvo9czdWp3w4v8tI+yaCBvyJ2QgESIsrRA2rg+RrXln1pjyD/Aw17g0e1GR0U99NHGNWJcW+sNHfh39ynN1AQ+1gCjdqK MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ab4e2eb-a06b-4d85-8181-08d557643df4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:DQA1yVbFaHZpE/YBq+xt5TP9Zr8RuCyFk+46vgm59BtYiEnsvoupxVMlg4Sk6/7Qcy+aZo2mhp+YdOQR2LQBjQl0kaNish7jDkIWXxK8SqrikJmCYmFAmIhQi9HAYC8UX8G2k8Yf+tILA83aVZQUMVIngIANAvtoVzBwF/ylwTYmfsLcvkXd99X+TSr4xJNd8ZbIJS6zuaSZlrQUy8rvPiLiLKqFxKm6cSaYuZhbsNA3LFzmYnKDnGx7HeboWA6GyKqa3dp9rS5214xCa8G/dAWT5FBiUaN6FiKeS7QPbvIePJJQ6dWCOb2TPGAPL58vAPAMCpsg6FRqQoo0M0ZEsHbGC63+jXnN0qOhR6B1/lg=; 25:sRVKPYPCAenu1RwIL58X80ekyTT7wMR8uq866NbJ9ihSh3ODdm6tTbuFzXEZoJIdv5UWoEz0jE5o1jJ65FjWf6Gq90i9rNodtMyei1fepFMPx7hDqq3W9a4TUkSfAcKUVz+HryoY2w+QH5mwijoYXzEkxY4OpnrwtKQBHCkk3/KXNdbkD1K+ZG9r5RO21Mp1gPwCxtXUGZBS8rJ/ElNnw4saglGTGY+3kvhkMir8XijEv64A2EWiS9re6EHdVEZtVlpMoZHfD1GklS7CJX8KFrRyLDf7sUh1heE1QwerRocW9jNl1Q/cDDhRzfWUE76MMa0OZvV+eX5dhiGl/gNq/A== X-MS-TrafficTypeDiagnostic: SN2PR03MB2365: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 31:DhzVV152JmJfYR8bM8JJv5My86yBUbnGqUAI1VDwwxzHo/nfVPEFG2nF6wKVr8IHLq95cNyiNvIcr2jldnLQ6UOcwedCau85g0Ry6v51Gb9+zQvV3wMSp5Vnl0I9oQYSZgm4GTJqiR+bLGZqlq8kRE0zgJIsdbfs9ia7WL6qkqY6Sat5T6HlL5Cyk7T+nGYfM5wIQlfiia9z8plh/CK4CEBulm5djoC41WgdtqrUU00=; 4:RAS0cokxIaw5IviD21JN+zSEaMovvx5rqJrEuIgK5io6r+Zlb/6/aNJgck2xCy2aKjmYUZPpew2woqFSxRfhGacVSxi+StDKu+PoFwSsCVg9ghh8k+Tihh+iXj0ZcS0o9qvDTs6otseSoPwA95NE9OLrt4oXHnE4wsE2DCkV/90K6T9n/dasUKwd3fq4YMSjzDCZXDeAqrfjGoyL+OMLPGOGSNquL5YhzrPoMSgVdBW0XYWFZym6zI3CX0i4+wzPJ4A6Yt9J1ngvte+miZC5wmBEmozouCS4j5JiYn1h3owWDXzDnUVEc7Pg4iv18TTV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3231023)(944510075)(944921075)(946801075)(946901075)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123556025)(20161123565025)(20161123563025)(20161123561025)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(201708071742011); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 0547116B72 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2365; 23:q3nN6BQw0RSD/2UMZscS2aFDLT1WcIrGSV1tg9mxg?= 2/rjGXmvXhb0PvL/6ogjDha7yGYqVAt6/Y7hQWKHJpXDCmKdkUvzvfgJUAgj6rY7DvUdWrfSdng73ASdhVHQttVB4ElmOX/hmPH/efPINJtsDGoFo2MHnpIw3cT8cjAI56ynkMXHZwFLV6VwFQtBQXYwMbK/BbnZGX7/Sn6sAG4W8rgL+AePeWIdGfSM/G0x9JJw0z9noe5rc07ti+NaAlt7bQqHI6xuARoegHa54VhX9WVqk3ug++WMbI60UBaYP67Hz2X0se6l/d+Kp5bdwpY4uFP8dteYZ0TgKrMC+XpqeE6PixK74AojqtQMu47v74Alu5eaZ+kUqOta98et/KS+TPph3i1VwMMYMDIVTyJP6ZVubbmhkkwzCgxdCRqRdD/XW82QZ3HcCEr68sfFSMDxxjN6SyO6ynTbizMLCE0gAsFyv5TPROwDQMZQ3ovhJtUqTDR/65ke2jV4DXv56HLQrw44GgnPC749D9QCIyNunRg6ZW+VI6tW0vgzXDZIlgaUlfZd7dx8qnaUw8sbZbOxvLzCUcVtex0bhTTaDPNrbuzlLv6/mBQ0qgwk8poKeKzvwTQLmhQNdOb32t4HTHkdYGngg2JOjyZyKSdpKxTvVdnnsckI81H/A6BMB0HV9SgfLNJjlonRcG8j1ZLwtyrFR4AUG8e/dw2KNusUyopOVXX2Of6zABW4jcCRfmFQa4dkD8dM9rXeXcRC75EB+31eqAEqOYAFgr/AoxMvzocYbr6Nifk2vfgqxP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r0zR67DRlFV/7vXTdNtJALanI5ou+GDb1YqNGn62odPE/WfOTovmCqm/5BK8Hruhm4ic7ZqeY1m9qUx98anbIkEfeeJbygTVzPEIqFUX64e1kRzEh67tsTWvWa2mT9ZvQHvKPE0ZaoiE6cfFLXhfH/rj3p/6wzcX6KsMpPfxhxr+bnFjLvEGV3DELwfrBYZy+mZ7uGxWuakHSxPbWcC0y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2018 13:23:58.9013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ab4e2eb-a06b-4d85-8181-08d557643df4 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: SN2PR03MB2365 Subject: [dpdk-dev] [PATCH v2 07/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 49bc317..b6fd40b 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -906,7 +906,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 @@ -1165,6 +1165,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; @@ -1953,7 +1954,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; @@ -1975,7 +1976,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 5830ad5..5027230 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -1197,6 +1197,8 @@ struct qman_fq { */ spinlock_t fqlock; u32 fqid; + u32 fqid_le; + /* DPDK Interface */ void *dpaa_intf;