From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0072.outbound.protection.outlook.com [104.47.34.72]) by dpdk.org (Postfix) with ESMTP id 35E021B1A3 for ; Wed, 10 Jan 2018 11:48:10 +0100 (CET) Received: from BN6PR03CA0075.namprd03.prod.outlook.com (10.164.122.141) by CY4PR03MB2696.namprd03.prod.outlook.com (10.173.43.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 10:48:08 +0000 Received: from BN1AFFO11FD018.protection.gbl (2a01:111:f400:7c10::199) by BN6PR03CA0075.outlook.office365.com (2603:10b6:405:6f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.386.5 via Frontend Transport; Wed, 10 Jan 2018 10:48:08 +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 BN1AFFO11FD018.mail.protection.outlook.com (10.58.52.78) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 10 Jan 2018 10:47:36 +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 w0AAljSQ007124; Wed, 10 Jan 2018 03:48:04 -0700 From: Hemant Agrawal To: CC: , , Nipun Gupta Date: Wed, 10 Jan 2018 16:16:30 +0530 Message-ID: <1515581201-29784-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> References: <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131600548564859033; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(39380400002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(4326008)(53936002)(305945005)(498600001)(8936002)(68736007)(48376002)(50226002)(77096006)(106466001)(76176011)(2906002)(2351001)(5660300001)(105606002)(104016004)(356003)(6916009)(2950100002)(51416003)(59450400001)(50466002)(6666003)(47776003)(316002)(36756003)(16586007)(86362001)(81156014)(85426001)(296002)(8656006)(54906003)(81166006)(8676002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2696; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD018; 1:97Mxfs6oq22nKcwHiWYt7kOUy9h+KDvuCWt9KHekSBgNxJk3CAbx3B5i3Eu1OB1ycAjRjTSsx3blGVSFm/Pe/i9rNqGwKdk2f4URjbGE4fnzI6k2yNUFSPJY1LDt2s7Y MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a57cda6c-3eab-47d1-7899-08d558178feb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2696; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2696; 3:Xvpcpz91IUyEphwVWiMOx3Yi962YCC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tTdKnKOyDkD3ILhxoQ416b0wHi08khbZyvUrf282vxwjA6wK+2lnFdRJmilObzL58gvhnOC5RS43SsBvoiU0vmyYYgqnsPDhEidlJ8CDtbatXkCIxkLcT2lLXQ2J5/WwfEwmn85vQZxFDSMO9PQR/UlQz4ZroEpgO9sz484CbiWCrC8l0Y/4D1jlFXL/GDhZkBxsNqiYSZinzqUlVy3xA0JtS 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)(3231023)(944510075)(944921075)(946801075)(946901075)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123561025)(20161123565025)(20161123559100)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(201708071742011); SRVR:CY4PR03MB2696; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2696; X-Forefront-PRVS: 0548586081 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2696; 23:8K1M985QcsrQcH9mliQxOk+QTqHs8CQxPQzh2OHaT?= =?us-ascii?Q?Lkj7BARTZ4eoJSjbngv8p1/SapBRxvrTgoM3CCWJpoqlTMKQAyU0tYlce7Da?= =?us-ascii?Q?F0ZTArfRBfmX1CeLQB3szuuXm6XTErzCtX/52GU5U9XhhV1NRek/qlRcV4pS?= =?us-ascii?Q?zcan+0kf3QcSPTXNERrxLEoM/ZmERkArttfvROMV0QUiK0TaUc3K0TRNwY0q?= =?us-ascii?Q?RNo8pz+ctM8Kk+Ovm5yuAGMdh1q8WCtm1141geWA3AA4gvu+eLIMCw0Jd3It?= =?us-ascii?Q?X1qZqk/BQGzkFTzGwM6Yzfyil0kwlLDEisjc0i47RLMK3WMuxuZGcCutPqDq?= =?us-ascii?Q?mShkLPjcWeJQILraQ5k2TQlOfKew0COxYCzHJAsPIXqB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en0KX2z1YtQPm6xPaLjkRSBMzYwplhiI1yrPlCvHFatHn1oShA4MWxzbxT282x15kcLQIOEdaJpVdRw4tMIOP1Irx9SlaXBjbuU9nM7ohiz5IoQsd8eLutGW00mbmrSgZggKiYgv8tDFHgCvY7fc9mcv2hdUk/PTjAWpptTutDx7T+njuS0yBYAuvNj4EyZcKBTN6ecfxJFQtK4aIoWJj7b1HxfQ2HQMEyD8YPx3oEZO5vsB+k+s0pCf37qLmd248HEwsU=; 5:TS1sRj670xhlP+3HO1PSdeR5ISyKDgi4JEPEvwmw6L1Aj1XRxuT/GZPTamHEOkhpyfO2ocmxE1YmMM7GLVs7hAQw8T3yCc/YSX+dzt8Sw2R87KUWKsbJ9WWixMUa4+ydamtTnNM5oO6237ZqtOVinqsnKYOYVBgXrZ8RaDz8qP0=; 24:fu7wQYsw12mK9QfzqEepoAiCRbchfZ2R251ofDOd7pwY5AZvprH4payC93aqm+Ha+Q033UXgthMq1301ZaR/apok8B+eX/1oQ3mwE9zTf/Y=; 7:+cVOoPBUaXporBJrq2T4tUcI1Svbu0RMkNTlOhEfooMhPQGeh9uYdx05bvTcGHOFuuZliPAyyKAfB6OJKhwATrUmMht9yTNqABPtpvGWbTj4Buax3u9fgOiLXmdxfmhDZku1DDW3/as4Sdj8dxKm4/Ajo6lkzUA05oRTf9g9C25+3r90Fy21fU0mSzFuppXZxRlcrt9AZAO11EMaMoc4UINZd0eoswahqPJ8b+HLJ671pV9ORz0+Y5LIAfUtLs4f SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 10:47:36.0179 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a57cda6c-3eab-47d1-7899-08d558178feb 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: CY4PR03MB2696 Subject: [dpdk-dev] [PATCH v3 08/19] 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: , X-List-Received-Date: Wed, 10 Jan 2018 10:48:10 -0000 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(-) 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; -- 2.7.4