From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id 2E1F11B466 for ; Wed, 11 Jul 2018 09:38:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AchNZe38donaZ0t7s5JFUIkRcZ6PvTyiMHNeAOgn2+o=; b=LawfodHOJIwocniamarCrn443QirB7l4mNmpl711z1ZHla4jAiEzXM4/k4N0q2dbb10aNJyPKwW0c3hgPIgnsOmFbW8HPnI42puzv+sGRygSywhfRsqvLCwV1pV31xvgqZV60oChuqw25EZIh5pUsJJNd80PtY09aLsQvV3yUxk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (50.233.148.155) by BN3PR07MB2513.namprd07.prod.outlook.com (2a01:111:e400:7bbf::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Wed, 11 Jul 2018 07:38:01 +0000 Date: Wed, 11 Jul 2018 13:07:54 +0530 From: Jerin Jacob To: Kiran Kumar Cc: dev@dpdk.org, maciej.czekaj@caviumnetworks.com Message-ID: <20180711073752.GA23709@jerin> References: <1531293723-930-1-git-send-email-kkokkilagadda@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1531293723-930-1-git-send-email-kkokkilagadda@caviumnetworks.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [50.233.148.155] X-ClientProxiedBy: BYAPR07CA0009.namprd07.prod.outlook.com (2603:10b6:a02:bc::22) To BN3PR07MB2513.namprd07.prod.outlook.com (2a01:111:e400:7bbf::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff6df327-40ef-48eb-67a2-08d5e7013c57 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:VI7eIr090zDP7tyjpVHElVriotiKq+YPpbT/IP2y/QTc+esMSDyrNe5ZaGup5xxeYPqPQaUtWrFSkc2pgSPfotnrN9UymQmhC6KPFreX8Us6o646j4vr1PTPDiAyoMdk9+N+0xgVvWLBSM3smVJ8IFdlu1r3sv17K4avyxNxMeIe43q/F/gID/F6eSiMpi3CII42RjbmHlYZTJLfJRoiDMSGM+poznNsAdYrgjIei5IhWw32zFxu1JhIZLPSfEbA; 25:H4qgu7GGDI6UgZM4e9jb8GD/JxPCYZQYzKzUMWTM72fDCKFL6ITB3CwMrWTZPzQIH4PxiBr6Tu+io7Gw8u6vSiIXOaGYI08tF1UGhMrhQW9t8mesECnE+oBfYa4iRy4HgzCW5cAKICsZhKXI6UJkq3gIg6H0Y1JkS9c5qIOgA5O3ThVEfFinYbIQzMC3KZny+5+rKaKSEmxgnWTaCDGA8ddLWhL469npCRGyCiG0VBLvMI59/rjLxxcM2UdsbcFcILP5VLXHE/WdUSFCu09p9cWK/A52DgTd8PPLm9fAevdcI4dof8VdGNfp0ocohQgI2D+W6mQPi3We7tb1wC/7MQ==; 31:Bq4/99/XfJPMh0YSU61xlgqeKzbTRptKzotxmMZa0MpngdrwrJLAVYRX/XaupLqKJDnPMyXr7bYuPRGmIWV2VsIgGnl4xfyUQQHf8jTyZ2HImyEaiSHrCq5He+xCQ5uwucMhVswHjvlcsFIV9AWJTTvdfjUI/omV2e6FOinM/brwlH6+aSHeb1hASz0kJoQ2T4gUxppmph+Y+Qgd5U33T0ZXybckvZ8cgf1gc901cqA= X-MS-TrafficTypeDiagnostic: BN3PR07MB2513: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 20:YJ1CUfqw9VN3XhSCEKgQj/e7nG+h4H08EsNGjkkpfk6nf4Xz5V4Bb7iOiTMtwdVTLcCRRupdXDIRfi3klL/D5tyqK4546LUpGk7wWBfSQzXX7DaR05mfoYB0nBHCrbZHIfsswVkfedDAhR/rikv6C/HKK8C8B+xWEQBTjerIAoqe/lmq1bT6SxRWEfTDV8JSBcvdddZgO0MAYu+9GeD5UzCQvLtCwdr+ZZGsLxbhW22DLbQ0gRQ5mI7SruN11tumr7JG1RYI6PM+D7Ipcn81r9gdV78TiU7tRG18Iy6Cwof4wYEkBpET2ib7usm94PetK7VAEeD8iIrwmQMryJUUKZlK1hV1jQFw8ixCG7wE970j4tu1V+zMiQIqh9aGBVsXNcwDJg1ixQVRoCiIJpIqM3/JJqO8jQvkx1jI7TvPd2DOaExs7eiIpPUgkJ4QH3v0uaEybYmHE7TFcMuPlsgnBt8ugyp/o/L1yEhuwFzMe1FQdRGLkDKD4O6iGwFccfIC1lBg6UxQLKMGpAc70NxGxcfrEE9M2DtZzr+YI+VUIKVAquFn6hpc+Qss1/RJjvhTj/8K0gy/UBpNG+7XeJHE8f8bnrfU0n0jBNeKf1s8clk=; 4:xPQkfaXwNggDs4iJpp3+lCEGzqjclsYa4wHTqIVrF1grx1rSJcUakY7YnUWkF/uXfLb7IWmX6bCfCONB1jkUAqZTU1Up/5OqV79/+aPZa2vdsPQNqsykupvNDdrUvkNdpVkscnXlAeuowo2HMwj7xpdN0aiwGqGwWluoT4wcELKBp6d+mf/Tfe6cEAljivY6BVDC9Mtxnr3gf/HopbAgUCKWvQDx0WGEx7Vqr9L/2C6uU/CXb9m+VV8tiC0Upd7LBpxxKC9Z8FpScfS83Fx3Iw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2513; X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(136003)(396003)(376002)(199004)(189003)(13464003)(16526019)(11346002)(55016002)(42882007)(9686003)(81156014)(8936002)(6666003)(6636002)(44832011)(105586002)(68736007)(446003)(26005)(486006)(476003)(81166006)(106356001)(305945005)(956004)(1076002)(52116002)(316002)(97736004)(66066001)(47776003)(58126008)(23726003)(229853002)(6496006)(8676002)(33656002)(16586007)(107886003)(72206003)(2906002)(50466002)(7736002)(3846002)(76176011)(6116002)(6246003)(386003)(25786009)(33716001)(4326008)(5660300001)(6862004)(478600001)(33896004)(53936002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2513; 23:BlWokj7sGTrIz0jpStC7nTE0JeX8Wa/Equ0Ym5bFL?= =?us-ascii?Q?aG7qdEotYO4/UZVAYR/r91AAS2l6Wvnik9r3ae9eOR+4xUJo1iYrEYasE9s3?= =?us-ascii?Q?tkb9HYf9lpPbknRxojFPOlKwV1Bo4ljX50aulEwIf75nKRoTZENEN7m6iO7+?= =?us-ascii?Q?HqPByiWA8/tZiHxP8VgTJ3nCoLLv8rUDwPwy5QH2vCfmVkX4pAXgRjbUBR/U?= =?us-ascii?Q?aZWrEDThPJAVNCfKwtA97y2NYf0qWXT//o+KFlEZ6+I5N/13NCqlTDnTbSlz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ooQW8bQiiYllzLxS6pwlBC1gt7RIkLIFEwM7bZ523GUbYlw==; 5:oY1QDYbhvCz4BNjKHhyJPEBlO4Hte2lChWuuOoDOr2QPzqtIx9dBsbVbgvxmgZOfblnJj5FJUdPZjqPwlyezgBVxVWAfAT3EIZpDnEoo+xplYjgbWnSlCTMnqsiqqWicJ7P0rnUzmqkAd2R7KyDxtz7hD6xu9Q44tNxj0IcUL+g=; 24:Wg8iTB1k/tuO3XAu3SlgznTVth+Q+oS2ITO038QIZc/YDNszGRcZQjR3LvBiHRachic6bjcQBNrE8vW04fQYqzjNDundoFkQVIMbTenbXQU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 7:HzQEgFb3Dk0ucGK1LekLNv78CcwboI81LFlXp1g0fM+KWZf7HQLg47KjOY7aSwYNG9Y+2C/POftTk+IuK36+qHcD1Hyi4jL4JqtgmnHltGyFb6jxq/410ULFc68RFmj4JCQqXTpmir/7j5Ud6lnUHjp3wu0G9KyoYKWu8O6l8WQary/I/i331bXja9Q1sMZGFYTWA2arUuJEp6dJa39p7LsJbu78TOLzMsiYAAUR6w5jxmDp8LibRLlJbnoXzS2u X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2018 07:38:01.8682 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff6df327-40ef-48eb-67a2-08d5e7013c57 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2513 Subject: Re: [dpdk-dev] [PATCH] net/thunderx: Block sq door writes on zero pkts 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, 11 Jul 2018 07:38:06 -0000 -----Original Message----- > Date: Wed, 11 Jul 2018 12:52:03 +0530 > From: Kiran Kumar > To: dev@dpdk.org > Cc: jerin.jacob@caviumnetworks.com, maciej.czekaj@caviumnetworks.com, Kiran > Kumar > Subject: [dpdk-dev] [PATCH] net/thunderx: Block sq door writes on zero pkts > X-Mailer: git-send-email 2.7.4 Use small letter to start the comment.(s/Block/block) I think, we can change the subject to "avoid sq door bell writes on zero packet" > > With current code, we are performing sq door writes even with 0 pkts. > this will create pressure on register bus. This patch will block these > writes. Could rename to: Avoid sq door bell write on zero packet case to reduce additional traffic on register bus. > > Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx") add Cc: stable@dpdk.org > > Signed-off-by: Kiran Kumar > --- > drivers/net/thunderx/nicvf_rxtx.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c > index 72305d9..8075a8e 100644 > --- a/drivers/net/thunderx/nicvf_rxtx.c > +++ b/drivers/net/thunderx/nicvf_rxtx.c > @@ -162,12 +162,14 @@ nicvf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > free_desc -= TX_DESC_PER_PKT; > } > > - sq->tail = tail; > - sq->xmit_bufs += i; > - rte_wmb(); > + if (likely(i)) { > + sq->tail = tail; > + sq->xmit_bufs += i; > + rte_wmb(); > > - /* Inform HW to xmit the packets */ > - nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT); > + /* Inform HW to xmit the packets */ > + nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT); > + } Please add same logic for nicvf_xmit_pkts_multiseg function. With above changes: Acked-by: Jerin Jacob > return i; > } > > -- > 2.7.4 >