From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50072.outbound.protection.outlook.com [40.107.5.72]) by dpdk.org (Postfix) with ESMTP id D0D801B478 for ; Wed, 26 Sep 2018 20:06:14 +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=RE7CcpgZBBab5xLyF3ENaM/GOGSkb9FsyJMQGz1jl/HUbOs71xa38UQ/Zwn4SFP2JMMXna86cxk29GK7Vk2oq2OrGnAyZbwL3NpJQ7n9Q9YLu/p6iGPYoOGTgNe1NmnQMxKYIJMVbASMZ7xHV6ju6oQ+dTT5lRfywHp3FlC1Yd8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by AM6PR04MB4679.eurprd04.prod.outlook.com (2603:10a6:20b:1c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Wed, 26 Sep 2018 18:06:12 +0000 From: Shreyansh Jain To: dev@dpdk.org, ferruh.yigit@intel.com Cc: thomas@monjalon.net, Hemant Agrawal Date: Wed, 26 Sep 2018 23:34:37 +0530 Message-Id: <20180926180440.31726-13-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926180440.31726-1-shreyansh.jain@nxp.com> References: <20180917103631.32304-1-shreyansh.jain@nxp.com> <20180926180440.31726-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::24) To AM6PR04MB4679.eurprd04.prod.outlook.com (2603:10a6:20b:1c::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a7ce4a5e-ec33-491d-8ed5-08d623dabf51 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB4679; X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4679; 3:tSvt0jLH6tO+z3JsN/sH0HnzpJI3nKi0jRYblR2vqBo7OzIuaODI0EaCqfj9hVBgck+jAMOYEHc2CNsb0E/NFvSQAk7Yz1PQ0QYt5eFC+qWnlFtGmTlWSXG0UIzC2MjsilkwwYbK771W95f7DWcuSHXVEir1zb2d4SAZevth4httoAoEiR1XSCU6tmc3Kp0bdchR+GJwLzKMY5+I9qy3SzHpWKEHuLFSl8rIp2Bp5kGWopQXAFWRNERFF1u/m8u7; 25:O6wCtL78W2Z4NrAdILHIJfqi4I6Lj2Ys+vBm63Dw8ZxOSQCbLTN6TyfabT9BPe7N2n6OlIUCHEhIhcENHhrvdW1rcB5VmsXTJBYTa7HXkJT2ss7FxIG4PXJZPoJP/gq+wRWH3y07eXYIRqgJ2EQ/9YKByfuoLCMey833VPI5yN8s6BtwBPH0p8h8yRYj/xGvMGhz0xRIC4HVr3O17jxG/v+fUtYliMwa0jX7v6KJiT7mxiJqt15J7GXXxeZL0/X9bBjii+KDCqnmpPT/AhXIhD7v86h1xEBJLmQgD98yXeKm/FKAEfbvUIasosN3u0utxBpppF1PCdqHca+g/hBPJw==; 31:RO44x2S3CbnxgNuGTZueMQrN2Vd+em9nBceiUooRT9EbiiHH87taLNdITzg7ozMJdam96Sbv/MsX3IfHup/jiuuxWUJayu3pB6rsItx6tJy9x0ABXqpn2mOlKULJY0uP91ZT2aG8Xwj4y0O1I5mZibWVPE+GRr7FNJIJnAQwgNtFn9/4ASaqdB71hSn2zk37bSAoqMLNWWenlSwNmxoNew9Z+wFpRgJsteAvm8yn0q8= X-MS-TrafficTypeDiagnostic: AM6PR04MB4679: X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4679; 20:fJJf4cU7mbPQI0sO6Tql8DkDTCdImbMFsUe5ZnMwrmihjrKIgbyslaN3mJ+uLZWOyfzECVNt/xrUvhy0zmy2Ow7aTa8kuOnXsMw5Tov5mkY7ksYvFKbhY833YpnI1YgqhdavaFSZxL2GL0P660X0Lb/9cPUSXAXrKclTUb3UyV4In21In1PvK0oCl6VU+MQlYupjTthsSI6Zp0S9Hdw6X3/BX8BJyGxs5Z4xWUdgkQF435rF8bvMnwe9XF8nxlc/JSPZ6zaQnJJYkKwuNcbFn2aSB6n0s0tpe4UZr3Iy1UuV5Shb/f6HnaBw/herj6euG0xc3DGXVZlVBwcKefJD0JEJlU2fMkXJFWYM/IevMoJuY7rsaX3M7r87vQCb2jP5DU4pPJd9id04e+Oa6QtwgvIDLM2uWre61xBYajBaUpRStck76aeJr1TCe9la5vWAoop0j+5QX/AtJZALXP710iVEO0X1aoajdi9a3bByZdtpCqUYr/CDgZTB75jeeu3p; 4:tq9uGAGtdEaPszMa466j2jRghUw/6yqDd/KlMiDrZdORz77/oq6kvI9+0HQ6kckyRsNHuIb2KnWaJZsx+Po14UCbnAS0TvzZMvK5L6bZAdtekSABP5tRTAYMOr/dAAB9JlxrUKZ/SSXaNXYRcqK+pDKqlouiiRBq9aQLcxvafSqdTlazlBwCfsp6jzxv3M+eJEIQGIyzUhQeqKmtZt2SWMMPQASQ/rMqSMcAsPPawPxAisiFIO8hASS8rZ0p6VS56w+XYwhewIAecYRbTeq8eY5+Irqd1ZyLzRlODTzYPPAzvt2dB0Px0vr74Iimvs14MW0aiRnrcJUGOh+Do79+H1n+hIMTrt9OdtoENgGIEwc= 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)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:AM6PR04MB4679; BCL:0; PCL:0; RULEID:; SRVR:AM6PR04MB4679; X-Forefront-PRVS: 08076ABC99 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(136003)(396003)(346002)(366004)(39860400002)(189003)(199004)(11346002)(50226002)(446003)(47776003)(44832011)(956004)(476003)(106356001)(486006)(2616005)(6512007)(66066001)(305945005)(7736002)(6486002)(105586002)(36756003)(86362001)(478600001)(8936002)(16526019)(81166006)(50466002)(186003)(26005)(25786009)(8676002)(55236004)(48376002)(81156014)(4326008)(3846002)(6116002)(1076002)(6666003)(52116002)(34290500001)(5009440100003)(2906002)(16586007)(51416003)(316002)(97736004)(6506007)(76176011)(5660300001)(386003)(68736007)(53936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4679; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR04MB4679; 23:jecZyPUUTvbY8kgcVJ2Bp+iAC6iZTUseb+wQ6f20K?= =?us-ascii?Q?ef/V4Pro3KIzvr0g5emvzHge0ACZxVC5UhTwYiOSAOsdjABvELc2aELcffJ1?= =?us-ascii?Q?9sztNKfVUzcYBNmItbCpQ8dP4VG8S1LBFHQiizeehkaHo6JDZ/nfbFuB3awq?= =?us-ascii?Q?Qrsz58qykcCz9PAchy1XXjGKV9IeY1a+Hx3O72uVnBd8wpC9uhLdh874m82U?= =?us-ascii?Q?YZBaFbLMfF1hzKMbLYKj3d8natsZkDi0gDT5HbMUmU9ktkzEbLFTOXWkfIxD?= =?us-ascii?Q?gYKeoixdZ5H504WgFIQ68evzCUnJi5ceq9kvepCxt2igjjDPO5drXBhQSv/E?= =?us-ascii?Q?stQ9j9FFQN+ArwYzU9VzOteoUssG6n+x6gqY4RAvHdeVL7fF73n72nAszWyS?= =?us-ascii?Q?Iw1dz06ltiuHq1v5w/vwelw79dUFrrmWV5gVMOnoKk7Lz7HvxOuohbTWBEOk?= =?us-ascii?Q?hX48k9fcgF0nWAV612v33LrBMOSzRYKakDyXLHbwPWXImt9MrNfEn0Dep9ms?= =?us-ascii?Q?I+Afmr6hv3LEMRb186B2DI3sgPpLojodw7s3tSpla4oyHSmowZyJBBMArQav?= =?us-ascii?Q?0E5ESu13pyaYyH4oJ7FretFYUY4/gzzt09nQtGwdO9YfWfcVhHDA+tPxODkH?= =?us-ascii?Q?RxA0Nzz07w+A0iUfr/Dw2BA7axKZHPIv8kIA/9Jkp43hfby8HSDHGj7hnool?= =?us-ascii?Q?28npOeTME7jmMrXqUy81leBGURlJzmV3brTuJUW8C+OzMi2Bx1N+YoFZvVk8?= =?us-ascii?Q?YMukwRPUHR49Lz7JDmKCdYrMA2u2BbPZSgk62EVdiYtyLkTFnaqsawFmesx+?= =?us-ascii?Q?tI1Z7z1N244fsNXeqj+tvPUVf2OkRlGWhfklPq/lbsnuLGWZEyw0quBlYCAR?= =?us-ascii?Q?puZ7yevw4fQsAC8WOA/xpbGNLWCp0RKP6slCPGKWB25kGfIadZVhnmGI5IoK?= =?us-ascii?Q?dEgQ/1MWreT6Pbg9DMm2cOJ3bpuUmWaaJoxt/S0ABXwKxkGYsx3ZYtR/2mdR?= =?us-ascii?Q?Ili5qQnzvxfCMQPqe+nomoN5/Ge73CMiFU3CGKIi1aKptzYXgdijd9NsseYT?= =?us-ascii?Q?8DI32SecwbNYY2YPWrv/DlyVCxwbSOECcPk1NlB1jpUhdpV2R61Jy24MnV7d?= =?us-ascii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3jRlw73G9e5JM53lVbcfQiOcJ4G8TN0K7+iIDLvNhXQ==; 5:4KQbRRuj02JX3OTUGGmZkRxWDdZ25KLh5bS87xVxcEcbA8FUtaOqzyjYOGcJcIVCH3uoneEMenDEjkXw48WurqtVQbHzPEDfqUlLEMn+zW5dbSKEv6ZGZx6rySvdntdtz9tjiR+HlmlOL39u46/iCOig+C+0ejBjUd+ahE3gEHY=; 7:zpeLYYpth4BPv1LZALesciFa6FvNM6zz2yFRFdk40ARWE7aMlbLoxUg3b7KGiKK0Bw8i6nCJbBQunNIyfgxVvhFx3baKzpv/EaQk3j+IKNKWRqL+8wUpHDm406HNXq9A+iS/9jFufKz/KSqP0qfhR8Uoa3X/xBVyQ3cWD9kBAqmUUckB4rhRaUe1elvW8jTpM+bKuMJIyJba7pVqGoJUtJ5nj9dIF826TCQUdzhwc1nE7eXh6JeDw5vaI/frZbKj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2018 18:06:12.2889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7ce4a5e-ec33-491d-8ed5-08d623dabf51 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4679 Subject: [dpdk-dev] [PATCH v2 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: Wed, 26 Sep 2018 18:06:15 -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