From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Type: text/plain 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-Diagnostics: 1; AM0PR04MB4676; 3:QvGo5SJwW5kEYMvFjnDaawpJ0atnypPBYvmI7yPAO6Sp2HCT4P1RxYZXLnYyhF6tiXSOTnv6JzCrCl5MoDIGRQ2wIFrtjoTglLKsCXDcxY6HHgvBQmUSlynGsM+O5i99SX1veXhnXogeqzL39PnJmI0LBm8ucDcXzvVngpzIuuHmY4/usbhHaKjd/Hrm4p5kURXLk+4zbPCB968VCmM6+Wj1N2iDD87JBaBKbgAEvqTMQKtxP9MtLEz6isCFrFxS; 25:olIjCDyPgqjSCbsicJ8HPpFYkGftt6wbsrLR0TAkim47/NDioM7kXWB/P0GWtT8bEwgEDSv7lp/DYNI/4matvZJiwONYxLadh5qOV7snCSkMVSFNL4I4sVKd9QPStk8pFOW+suzHboqWoK5AbK6TvJoJgPRoznxm3UIkFJz2y8VxFt/Pa2OdNcTdyd9nrkqEgi7nuiIjk1EEJEj68Xb4mIS+3MBPQ+Kg5XA8pFRqMT+82ORfN7TiXNjSx100B8oX4QKp3JSV7lT9XVsT2ceG4AJWxKdES6HcW8gHbHviROYdD+F4JI7zzOKEBF8EaHQbSH+OSotKBJArgUU0hFzztQ==; 31:KpWdxF1rKRmGqkSGQNcfKfdtlbPWcjQWudHiDXAXtfMZ3haPy4AdHOBr7ibY2iQLTUQFEfbzPfY3P07EjN4+l9eBxClmqlLZPjoc0T4B03qp7ntgFeceSttsvRY+oTKFvWW4q0+DCgSG4smrpSfe3/7YEEmwMx63/ExV6zPXpdyOAIT+/B2QMPNC/7lR3why0IHdIgWzzp7/xV35oirIrg2XM+4DF2TC8lNx6qezXhc= X-MS-TrafficTypeDiagnostic: AM0PR04MB4676: X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4676; 20:iodtQ6SvdDpw/nlciZ47M69hfXNJfJfop+EYGQFO7jUUc9/SfVJE2sJxbgtpLmB7scCJFljAq5s5pRqUODeEOvfs0LGfNAiAonkY4V8ApJoyoj5B19wXKLtAFgO02U78ViazTo3j0gfMeDu4r0TP0MaWfgDg4dzyQyqnnuUFC+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?= =?us-ascii?Q?YMeEh5xLx6kd0uAIM088hG66Kh++S+SV4WVuk9EhNY8ueZj8RKS/E16tWhcv?= =?us-ascii?Q?RxQtl6RXegJ8bRHY+KtNvSCMelcMIIfQ/X9LaMhzSgxeZtpSn/665BR1qKMV?= =?us-ascii?Q?foz2L2ubO4fZ/Y5hWz/gv2n6cuPmpE14z2T7xY1Qv+7GuDtRjeAbqR2tmtff?= =?us-ascii?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hX3WSe7fpy19?= =?us-ascii?Q?VpPtrNMhrjGtYJ4m4ov387Ke2T9bzShm50yZbNg3ojXBNYLmoYmb5EwPIoGK?= =?us-ascii?Q?6MpzKjvVYRsdi0/xmlmFGC1ncB5iwcdv1IfmUxLU8N8QweheLLDbsoylkPFR?= =?us-ascii?Q?7RmeVoUQO9pcYM/fUgPfRK8Hi4WM1aFiJ4jVItCXjLpDxziFmXVEe4xTYVzf?= =?us-ascii?Q?DJUWsucp+vRjCi5VgtLyetRgITCWFdWhtH0KFkjL3a2?= X-Microsoft-Antispam-Message-Info: 2/nhlaikfNLFelPn1DT99qNW+6KRLuf8X8A76Wnh8NdSQiNi4zH9dkGHtv5iqPP1hDkLtZNblAk6dJTkhwr2ZVF+Vvf+QwnlEEso5njUDHIfuTqQhBMo9/ItpEDpMdiMWU3Y7a9p4HI/0G1phAGl5S6hXxdmHSSeOA4vuyTW/2lAbwbP405IQ2rVl3Su//xzS/giSjsZ78rVZmv5Z+6MYSIyGXEry1rNTgIeObbgwBlfTmiOc4ReClLJbfz8kFsA37uXWvRkResGThrb5An4Dr6/6wkbjTyELl1QS4DYTUt9EGvelt9CFKK20gJE2FfOs08iOFU2dZU6klDXjufETsilgPGelsc5qYdf8WhUMCI= X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4676; 6:EyevPCNGel5chcGZUUiSzwiSkcY/LeK62j9AvlbdvoLWR2oHciyPU/ryVWn20gG4gJ8a7y/vkXqD9+ArALnlKnGky+QWGxgUKUScmOU8krqJy4P+IC+8OvImAFBjFFOjAD/PQrK8/vwupwDy0494Am0fX6inE8sq2eOeC3A0rij/6KJBNEm4E1/1Aj/47FZ2+55M984suD98eH4s/rYl4moLfMrISvU86ewhcA8IJ17NqyTbQMJQ7dj4ZrtA/j5BZwnESZMgBbnRShK1Sh13JkTxlhZDQr4pXYJJGgxoLEGBu9t2WEchmtiyeJk6GxjOVhnFP6eZgrig09Bj2xIkMMbNL2FfcikB98vmeOyhwBKuA6D6a0GCSf4zMMlqXMRlD+vs1HJw5rHiCY44jZDIBP0R8Wwh+vZro74RKvdECpQ1Ue+dEB55MQBPBhUCIqqnTt+b2BhlnbKK+hW/fcNGXQ==; 5:oczG5dgBKwj95hgaNi0US+MPzUcwVjfeCsiO+zKGs4FB2XFZ+Xvm54QM9JLBzrEggv6ZZ2HjI81hiRgBnXfdKh4nntBdirKb7Jxgh0WewKE/R66MBDdzenhqgGe4LlluusxpG6KX1C5mWAxQqwAPnxOoEC2o1Jo3orQ+24OrNbE=; 7:EPCJkdh0eEwDM9yTU/rV48J3a2IJCWwPSEx7eYkBrNEH+nr/ZSsYaaOKox8ZfZF9U6XWfK16u6fUTwoxxjI34Ac6kQYKP5I52TqYyWZZGv1YHnN8ZZwbk1T/Rl7YsHCrVFUf0BZsRS2TapjgGyxH4ChiLnLjkkl0OgZL8V3UJFrLrF1CzGpwYPN2Tn3klSItSEjFlssc6s/hRiXuhpQXsE4gOUiCVDf2KN4uiBg33nrnnqFxSj9di4FeCBsIpvyj SpamDiagnosticOutput: 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: , X-List-Received-Date: Fri, 12 Oct 2018 10:05:59 -0000 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(-) 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 -- 2.17.1