From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0043.outbound.protection.outlook.com [104.47.32.43]) by dpdk.org (Postfix) with ESMTP id 17DDA548B for ; Wed, 11 Jul 2018 09:22:32 +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=y5pqlEm76KAiXgMnAATB9zNZzQcgPR+Tqt8xiXKnEMo=; b=lzCGRKJk5DL8CPmSVv3IACG3C8HASYf71B7K1SdNkqEe1HC/wugP2Y45QhT+iD9HKEBf2RbuaPs2ce1CbjKVV48XWX7fqyto4YbErTj/wBwx7K4h3ZSHRGlZQPIUbI8oe1IWeLt/oDWHYahTRY3u6QLIOBeMmFRM3vH099zU5IE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kiran.Kokkilagadda@cavium.com; Received: from kkokkilagadda.caveonetworks.com (111.93.218.67) by DM6PR07MB4954.namprd07.prod.outlook.com (2603:10b6:5:25::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.17; Wed, 11 Jul 2018 07:22:27 +0000 From: Kiran Kumar To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, maciej.czekaj@caviumnetworks.com, Kiran Kumar Date: Wed, 11 Jul 2018 12:52:03 +0530 Message-Id: <1531293723-930-1-git-send-email-kkokkilagadda@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0015.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::25) To DM6PR07MB4954.namprd07.prod.outlook.com (2603:10b6:5:25::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2b95ebde-e25f-4858-6add-08d5e6ff0fa9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB4954; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4954; 3:Bw1T0ks2/E+uY7Y6sIqNTpKYvyrtnqbtWHUrzVNg/rkvjc1zslosYEAnRAn3Rqw3UMe3ArXcEzd6zkLccivkUdbiiUoEpqf8FSwdVaQTu8/Ioe3AJx0XyriJcCzy5GSr0OtCd/Q3sXIsXFEm27jVrAz8yoNzmemK1jicy+zvi5YRTpNqcQs2T4NGkFEuoBglV++V2K/K9Tc7tN8DJu/UYd/efL/WgNvdC0XecY5N0beft+xdpZN480L6seEAMxy3; 25:9cIiw+RljnItf/eGOVjeVK1N4ITOVXkXqGNVk10ihgDphKj62FOvfuECQklPMv+eDpSksPL3DFHrBToWlsJo2u3/vGeOe1UPpwfM7H8LsNvll+PG3ZovXzzkwgiY/+cW800lf9ssryusjm/YL3gMib6J5mbdUwyUSC0GVo9dksBtCs85t1fxrFU0pClz5yPQLXBxBT/g7xum2HRUBmCK0e5vTRDC90OQtyaQrVVTCi5QwUT7nMs0QE8r1WZ4u1sXgDZbV+cGZe7tFuz3XfhuCQwu0uzpgcuxBoMjWQwbmBFCkdGn+6YtTR4yxxkm+SbfQ2mJaePmf8irO2BkcPFFEA==; 31:3kvFoZ5IwWl/yRtecN9eynPZRama8rGRSQkbaIqjXA2+yQmhenBSZp9EBmro0E6KcMkEWaJt/ldJibhPp3XXxh9TXNF5+vsCiFqK2qswSytjeMaSMgEcAnFQmjhtxDtTqEjyx3VbbRvkQplCq4t6KTUyXGr2gX0KIL8n3UsjsXz0peU2u1WmqWLC8pmzU0Q4P1CQ9DzUp+R7EYCDt1ZyyFCa2mAIWiFwzR0FksErEYk= X-MS-TrafficTypeDiagnostic: DM6PR07MB4954: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4954; 20:2475u3zVY4t1PWBcgK55iF7A1iOstT2pAk8CygLmKzZW8GwbmujpuFlmVn3A8Q2kbJdlhIYmlmdlOzRLRfD8iZjlJ/TNayDka2pcUYenVkmDT4cyIJ63fBvyqYPIjMneZXrg10l5rnhgd30ElB/BnA/VVcG486mbD3nICQmyGE6RoU/pOJE6zinMtFhkwyZ1k6zYV4qGaNfAp8Zos1LPPpsi3Zf50Q2kPj4oI8/hMwa+M11ONdOsu/4onSKfYM7aegwTZYVzJwF9x6K5QMKtxnRXITXJ36b/NV2UJxCPJhqdhZT1SOFdG7PkeRaVtX+tmaccTbpga3FCqC3U//li/lAyPnOE61okEPImJAOItHqEvWbCWW9CbINn7nGF3pfpotQg1Q64cUnNbOs17UjbE2XcH7Dh2PKBNUksEbaKRKvtImKb8vi3F8V2T8Wgr07wAhE8CIg76/JPBbEJAnzPsAGbe3RhFc2zSb4QEnV14d3tzLO8cb0ZX8iz5kd3hnpflZjwxVs8kEdhieI2bOSs+cVYE3CsAFr/ERCFkcts5bjMyGwHbj1CNjU9lSbuYiksMEOx48O+DWkkcGz9bCWMhwOF3w65UpUHj3SnTBaypaQ=; 4:UDbC/LAbT+ZrUPD61fQizECwU1mlt2piWqafGNbqIdptKWXnszcL16gK8ZI1YNFuqnwxR31Z+oCMlUejkLsrWSGZweWzjcAMU8d0WLAFwWdxzBxFvgIKyi094QpWmTl6NZApD4r1B9ypWBEREyvIS3VnM84AT8LdQqzxHJCZazMYU2zhoc/TkfT1yPw5bCToNHxs4/dIb1XZhcMhWHLMk4MxpuR5HYp8yTF3cvFXKNecM+xPk6OLgDZtdVKqLK9zSpwSAR1uv1M+j74pQNZAgw== 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)(3002001)(3231311)(944501410)(52105095)(10201501046)(93006095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4954; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4954; X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(366004)(346002)(136003)(189003)(199004)(97736004)(48376002)(50466002)(68736007)(107886003)(6486002)(53936002)(50226002)(2361001)(6116002)(25786009)(3846002)(5009440100003)(36756003)(6512007)(4326008)(66066001)(105586002)(106356001)(42882007)(956004)(2616005)(486006)(476003)(69596002)(16586007)(386003)(6506007)(2351001)(6666003)(6916009)(1857600001)(305945005)(7736002)(5660300001)(16526019)(186003)(26005)(47776003)(52116002)(81166006)(53416004)(81156014)(8676002)(2906002)(8936002)(72206003)(316002)(51416003)(478600001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4954; H:kkokkilagadda.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB4954; 23:28QcVOgPTpX939Gc5JX0J1yRp/RyUc24XkjVV7Ofo?= =?us-ascii?Q?KV/CnhWefUrUIEBDJwAeCGEmbY5QUQ96pOwZFnNwSCMUBzeTWpMNuezeUbfy?= =?us-ascii?Q?SSotYDl0rXLlm2fKIwXHebxJLOCJeJrGhFnZCvhWOAeRD9Fv7/2Rt2OeuBkd?= =?us-ascii?Q?gbeRx8dN1gfTvevANu6YRzU7Wps+Uzmm0Mohbd4FhQp2v5IipFRSBxgnzmOW?= =?us-ascii?Q?Gh5nbflF3SXqBrI7nl0EzpvSlBA2XoMvULxctwveitm8IJQJirS753IW/2ug?= =?us-ascii?Q?+4BC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z+bgg==; 5:274oeck/vJEDMGGh8kYN9Jkr3Ml+PA1BicXXismcva9Z9aTD38Krcqg5hzjfAcF8tYq7eZb0srDwZ1HEK8gS6BAKqcMQ1wZD8RJaAsL850ROGyR3UVCh27V3vysMT+XwUPe0LrE+QxQfcBUBitYWLfY+0qSTNWxMC0rLLTuDHnI=; 24:Tr7MgiHaj+Mv6b8PRAeFFB3L/UvOXDfgsj3uFc0Eh0dJGzumkHsvsHrNpL/7wYNsxfT79wXgwYlBoFXLtlJAym+eVk4a0hhr7S47uRGQ1ro= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4954; 7:HfwZQSw8GqV1LnKVKkpXspIacQVpe9bbwgBUucU4T172RK2DfGgXrx0fs1xCOUW6TiRe7i5Q/MO+OBaWM63vf/UQvu+JVfzZlP/HkZ/aDPCeND2VbDo69doUZ0sNzdRQbcr8jB/WGS82QTly5sEB0TkAz6yF6nchN9AfrO8tfaUeLQSW3mLlgLN4xyXQqdF8HIx3/RdJ9wlX4FWKd+NEf6bgp/1ZDKzm4V8JhaxShwIAn0zbpCJqm/gpqfS6OA9I X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2018 07:22:27.8250 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b95ebde-e25f-4858-6add-08d5e6ff0fa9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4954 Subject: [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:22:32 -0000 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. Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx") 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); + } return i; } -- 2.7.4