From patchwork Fri Sep 21 11:05:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 147236 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp672098ljw; Fri, 21 Sep 2018 04:09:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cxOOFSKOA1P3SdYjIuKkBPd3z7slpR7gAeiTT+eKhIcxGbfSEQaYitPWoREZIdiKp+xkt X-Received: by 2002:a1c:9b95:: with SMTP id d143-v6mr2306286wme.95.1537528148387; Fri, 21 Sep 2018 04:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537528148; cv=none; d=google.com; s=arc-20160816; b=By0+DS19J20NeNvGJj01M6Xt4igWxhlBydvPSwO2x/1Qm3FCdpGMIB9sy4//jVAOho cqL6DRSHcBZPk1Bb1RwEjIFEaEk0cWZc9vrjm6Jsknn4LrEtmq6VjrvRszdIbDcvsIRD sB2doQVSI3TXchOLn30MEjpupqd7yUo+bt+x71wD7grIk8lkxppz5zwp5Wr3QC5dZZpK w5WwJ+wSnkfvzbtJN+gK435YGsPub07jtvFkzttJ9MPtwZhRJtvCYMirkDtN4jK+WgrN 0O7NOUolrofoCDVBVVykjkX4YsCywHF8dCtuNELheK0j1qxhhQCC42q+a4awOIZZqwfs v/YQ== 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:references:in-reply-to :message-id:date:cc:to:from; bh=7R7SWZykjj7IzNAnmaecbbGOQ2kTdi17n4k8L1c8LbA=; b=e3hQ49hYxTAvpMAxFmaI0zkhQj30v3IjsH1zqQNkjqOeu1GQimylUhZ/fwtksd4Hs+ xqvpJqshHqP5vsPWueKhMHC72Wdb8q8W2TJYtgTfNlxSiHffIEevd8nSt9lw3xKV/p1l EvLruCG9+WzQMZVx0fVAPQNZAl5IAU83LqGMak0l6gNexvKMglqhtiqrydrLSix1i8zm EBMWUKJPU4Y3Iwlhf83m6xmzfn9ST+PliH+RFnJt2GdM+N3PWiL/3mTblp00pw/wPI4t wyR/eMm+pKUm7r0TmcGnbQILU9KrcEk7e6A/v54nUq+xh7P9+67IDror2iWLeRJw3Lro vNjQ== 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 190-v6si47174wmr.140.2018.09.21.04.09.08; Fri, 21 Sep 2018 04:09:08 -0700 (PDT) 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 04F5A5B30; Fri, 21 Sep 2018 13:08:25 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id A70524F9B for ; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8BD4B1A02B3; Fri, 21 Sep 2018 13:08:12 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 462091A02B4; Fri, 21 Sep 2018 13:08:10 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8848E402DD; Fri, 21 Sep 2018 19:08:06 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 21 Sep 2018 16:35:57 +0530 Message-Id: <1537527962-25757-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> References: <1537277516-8876-2-git-send-email-hemant.agrawal@nxp.com> <1537527962-25757-1-git-send-email-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 08/13] bus/dpaa: avoid using be conversions for contextb 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 minor optimization in packet handling path Signed-off-by: Nipun Gupta --- drivers/bus/dpaa/base/qbman/qman.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 71da275..dc64d08 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -852,11 +852,9 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is) case QM_MR_VERB_FQPN: /* Parked */ #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - fq = get_fq_table_entry( - be32_to_cpu(msg->fq.contextB)); + fq = get_fq_table_entry(msg->fq.contextB); #else - fq = (void *)(uintptr_t) - be32_to_cpu(msg->fq.contextB); + fq = (void *)(uintptr_t)msg->fq.contextB; #endif fq_state_change(p, fq, msg, verb); if (fq->cb.fqs) @@ -967,7 +965,6 @@ static inline unsigned int __poll_portal_fast(struct qman_portal *p, *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1136,9 +1133,9 @@ unsigned int qman_portal_poll_rx(unsigned int poll_limit, /* SDQCR: context_b points to the FQ */ #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - fq = qman_fq_lookup_table[be32_to_cpu(dq[rx_number]->contextB)]; + fq = qman_fq_lookup_table[dq[rx_number]->contextB]; #else - fq = (void *)be32_to_cpu(dq[rx_number]->contextB); + fq = (void *)dq[rx_number]->contextB; #endif if (fq->cb.dqrr_prepare) fq->cb.dqrr_prepare(shadow[rx_number], @@ -1195,7 +1192,6 @@ u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit, *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1260,7 +1256,6 @@ struct qm_dqrr_entry *qman_dequeue(struct qman_fq *fq) *shadow = *dq; dq = shadow; shadow->fqid = be32_to_cpu(shadow->fqid); - shadow->contextB = be32_to_cpu(shadow->contextB); shadow->seqnum = be16_to_cpu(shadow->seqnum); hw_fd_to_cpu(&shadow->fd); #endif @@ -1556,7 +1551,7 @@ int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts) mcc->initfq.we_mask |= QM_INITFQ_WE_CONTEXTB; #ifdef CONFIG_FSL_QMAN_FQ_LOOKUP - mcc->initfq.fqd.context_b = fq->key; + mcc->initfq.fqd.context_b = cpu_to_be32(fq->key); #else mcc->initfq.fqd.context_b = (u32)(uintptr_t)fq; #endif