From patchwork Fri Oct 12 10:04:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 148742 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp539660lji; Fri, 12 Oct 2018 03:07:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV63FdAJCqnraxjm1VBshDAi7DoTD4OX0pVvT3tjnxSeGJWYcEORICNkj7fyZsVZaKXnduSRm X-Received: by 2002:adf:da43:: with SMTP id r3-v6mr4788705wrl.221.1539338856627; Fri, 12 Oct 2018 03:07:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539338856; cv=none; d=google.com; s=arc-20160816; b=Teivba5ur5ySKAO4RYQmoLmcMYTCGkeflY3JZ5yq0iVO94SoeqihDIIkfvRJIcIbLR ly1U9uH0wXfgxVQQZeJnCJJJ6pIB3Txy09wt41re77WsX3ZzhaO6cEp+ZYfsfyn83E1o pS9UucUdHdo1gQGGpDke2jqyxWZDn3eILKJblmra0m01/my9aw03Iyvv20n9kW6/Y9Ep mXhl218Ub4VoNzMZWj5wji4+/XyrSpf6ntaWUtAiSRF6xvfoN130y7s7mOyfhWNv2ttG 2o5zYA5Bo5Q0pOqWnr8axei7YKOSOtASrfRaLeL5srECi4+aD7huzDvmQjOVetGdd83P gFJA== 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:dkim-signature; bh=qTif6LBovk9VlLMg6A/8mS+uHsrXCaDtZ9DESMA/N1s=; b=ieLcWvQ0v+AyOVzT1HAxTrTXjqR2zQmLVpnUo4OMG6ccL5EmKlVMOWxEVqoYuC4swW jk6c/rfdKyJEQQyCLH/HwrGyTtJMMj3v1OkLbY4j6exF0ctsmwll7Ed3r8JjT7gAQp2Y Wy6XDJRHZd+z/FDXHOCL6Qkrxb+riRUHRZHaZtQzUQMGKdY9mOpw/JE4JaxaQdPrAx39 kZ9m+wEcCbKKKSP54w4se0d3KJu/AEtf+bTWcZ2P1jBkV3jq5+smnRlK/l1lmt1VzG5g NKQVZW1HQEoN6WW0dXoztrGk3dkDDxXIS1QrLxpy65oaX6Mg4RA2Qn0OhH7YlrkV3MOs N61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=pg5O3Hxc; 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 c7-v6si661118wrm.117.2018.10.12.03.07.36; Fri, 12 Oct 2018 03:07:36 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=pg5O3Hxc; 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 F04EE1B4F9; Fri, 12 Oct 2018 12:06:11 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0059.outbound.protection.outlook.com [104.47.0.59]) by dpdk.org (Postfix) with ESMTP id 0CF521B4AE for ; Fri, 12 Oct 2018 12:05:59 +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=qTif6LBovk9VlLMg6A/8mS+uHsrXCaDtZ9DESMA/N1s=; b=pg5O3HxcMChdjFpjT0L1Dn7tXmIaNnxa7CCPp/vQerjv35RHengZdrUuwuUNqs41mJvZRhThAxBh3z+bR68KirpvuxsCQUfPkh+ZG0Jq4oDRXL7WK13Z3y43aSH9KBZ/G9m7cjYdZV0dfaAZstgOI4c0Jiwuy+m66/U/Z3xkmM4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM0PR04MB4676.eurprd04.prod.outlook.com (2603:10a6:208:75::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.25; Fri, 12 Oct 2018 10:05:57 +0000 From: Shreyansh Jain To: thomas@monjalon.net Cc: ferruh.yigit@intel.com, dev@dpdk.org, Hemant Agrawal Date: Fri, 12 Oct 2018 15:34:23 +0530 Message-Id: <20181012100426.29349-13-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181012100426.29349-1-shreyansh.jain@nxp.com> References: <20180926180440.31726-1-shreyansh.jain@nxp.com> <20181012100426.29349-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BMXPR01CA0004.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::14) To AM0PR04MB4676.eurprd04.prod.outlook.com (2603:10a6:208:75::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88dd9b99-342c-4e09-ef8e-08d6302a4e65 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4676; X-Microsoft-Exchange-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0TP0MaWfgDg4dzyQyqnnuUFC+mm7im4iacKVK3okbPSwigejb1JxTQqkl+YBZLC/xMJL1fqIZucSd1HrnagQe31Vxk3+vnJ60aLA4J+v58gbIu/YY+hABdnP4kVUnOIwBMA2QC+15vY6xIiuLIjHUYdEGRjuY2gTevzmGHRojLJ7UA1YE2QrH5EeAHbcwPNwvkga5btwCkOzHt0lCUojowOWqQq49Xc4QWeny07DkNhCTjnPPo1+Z7e6ltnT7CSWcnTfczOv2Gx7sAyGnPL5wzwejdTiAr405LeqQvdD4Ii9vQ1QRnECFzeDjLiaT21tdVHLYsm9Z0PL+2QMv20AssF9hI8yXX0LFR6/yBS52HIyfsT; 4:R6a7qxBBJfDf4/bn7dkH20jGJ4ODMrjW0SL6IpnWgd0NMQbJlHwir+2GVmNqFdhKmSCXqlA3WZk3PoicBKhhoSHCcHiY7wf/VN3QO7w3VQeZunJ9zIE6EOXSsgUqs8P7PUhy7065Vi/VRitbZL8btMMJ1SPyD9DDG7a0lJ5TV7U/gR+yEa7/jNThA4PuH9l9PaaT8JyeTvgAFgHW2yP/rEQHEivCLpdHgm+4oKoSnVc5I62sn4ob1swrafEm6wOFceNAVOxb1mVYdd1ZZe+FMrGvdX+Vmg+7n1L8Z74tRZoddYLIYrF3A5hxFxDxUQ2uMclv4KNR29WAHg+8Lqkayk8BJWUqxTT7kFIJKriytSE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:AM0PR04MB4676; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4676; X-Forefront-PRVS: 0823A5777B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(346002)(366004)(136003)(39860400002)(199004)(189003)(2906002)(52116002)(16526019)(53936002)(8676002)(478600001)(186003)(386003)(446003)(105586002)(7736002)(106356001)(6512007)(6116002)(86362001)(3846002)(81156014)(50226002)(68736007)(1076002)(47776003)(5660300001)(6506007)(8936002)(78486009)(36756003)(316002)(26005)(66066001)(6666004)(25786009)(55236004)(81166006)(11346002)(48376002)(76176011)(44832011)(2361001)(956004)(51416003)(2616005)(97736004)(1006002)(50466002)(486006)(476003)(305945005)(16586007)(6916009)(4326008)(6486002)(2351001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4676; H:Tophie.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; AM0PR04MB4676; 23:zEhkvUO5w6EI1bUpz0pG5adJupYhHg/2dfhbqBNna?= YMeEh5xLx6kd0uAIM088hG66Kh++S+SV4WVuk9EhNY8ueZj8RKS/E16tWhcvRxQtl6RXegJ8bRHY+KtNvSCMelcMIIfQ/X9LaMhzSgxeZtpSn/665BR1qKMVfoz2L2ubO4fZ/Y5hWz/gv2n6cuPmpE14z2T7xY1Qv+7GuDtRjeAbqR2tmtffvnPyn3WU1zZy7ixygJoE7Y/3BtaDXykuEXGVBCHIp6toYWaj4C3Mvod7mn/b7HDAAtmKnAV1dswaDQRj0nc3vjhuIw4xsPrABoUfVvzpMVbPznA1ubukBf1IJRC15qUEQLuzMA5uUUFTyIdAaHqKfJPxTlrr3vDrTSzAR4lmrnCh2nMAdhresmIR7NnyfZlspzfvaDp2oocgmxwZFiQ2w/qUi+cfXUHorEYxH4JTQyqxF8F66LiUhiUGjtjN7pUUoimbyHDIIFmm9UZRivUbU1s9BN+BYJEOxc3RylsQ1a+jYQi8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Output: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2018 10:05:57.1719 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88dd9b99-342c-4e09-ef8e-08d6302a4e65 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4676 Subject: [dpdk-dev] [PATCH v3 12/15] net/dpaa2: optimize the fd reset in Tx path 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: Hemant Agrawal various field of FD structure was getting reset in scattered fashion. This patch align them in single macro. Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 6 ++++++ drivers/net/dpaa2/dpaa2_rxtx.c | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index ec8f42806..2129b9154 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -209,6 +209,12 @@ enum qbman_fd_format { #define DPAA2_RESET_FD_CTRL(fd) ((fd)->simple.ctrl = 0) #define DPAA2_SET_FD_ASAL(fd, asal) ((fd)->simple.ctrl |= (asal << 16)) + +#define DPAA2_RESET_FD_FLC(fd) do { \ + (fd)->simple.flc_lo = 0; \ + (fd)->simple.flc_hi = 0; \ +} while (0) + #define DPAA2_SET_FD_FLC(fd, addr) do { \ (fd)->simple.flc_lo = lower_32_bits((size_t)(addr)); \ (fd)->simple.flc_hi = upper_32_bits((uint64_t)(addr)); \ diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index e96e84871..fcd48b389 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -30,7 +30,9 @@ DPAA2_SET_FD_LEN(_fd, _mbuf->data_len); \ DPAA2_SET_ONLY_FD_BPID(_fd, _bpid); \ DPAA2_SET_FD_OFFSET(_fd, _mbuf->data_off); \ - DPAA2_SET_FD_ASAL(_fd, DPAA2_ASAL_VAL); \ + DPAA2_SET_FD_FRC(_fd, 0); \ + DPAA2_RESET_FD_CTRL(_fd); \ + DPAA2_RESET_FD_FLC(_fd); \ } while (0) static inline void __attribute__((hot)) @@ -689,7 +691,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) /*Prepare enqueue descriptor*/ qbman_eq_desc_clear(&eqdesc); qbman_eq_desc_set_no_orp(&eqdesc, DPAA2_EQ_RESP_ERR_FQ); - qbman_eq_desc_set_response(&eqdesc, 0, 0); qbman_eq_desc_set_qd(&eqdesc, priv->qdid, dpaa2_q->flow_id, dpaa2_q->tc_index); /*Clear the unused FD fields before sending*/ @@ -717,9 +718,6 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) (*bufs)->seqn = DPAA2_INVALID_MBUF_SEQN; } - fd_arr[loop].simple.frc = 0; - DPAA2_RESET_FD_CTRL((&fd_arr[loop])); - DPAA2_SET_FD_FLC((&fd_arr[loop]), (size_t)NULL); if (likely(RTE_MBUF_DIRECT(*bufs))) { mp = (*bufs)->pool; /* Check the basic scenario and set