From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00078.outbound.protection.outlook.com [40.107.0.78]) by dpdk.org (Postfix) with ESMTP id 5FF4D1B19A; Wed, 13 Sep 2017 12:50:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=urBRi0EmbIJwf7vOw6dGFx0RC5HXyQTUw8xw8ZHDOh0=; b=pRaq/v2yhjQvK3nkR7OiDXLmRM8sW0uQuSI2Nm8JOxh57G7R+BZoo0UTJ22T1rhVemGuzOj+luc+QEc3Wr3HvrW0vawcj1RQjcV34SqEoeDS6BTVe3pyV/Ff3Ce/0Niy5tnTeIUXneqXN1UrXX5vYggiQ+RYuQSJqEm4y9NCRjA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Wed, 13 Sep 2017 10:50:46 +0000 From: Shahaf Shuler To: nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, stable@dpdk.org Date: Wed, 13 Sep 2017 13:50:37 +0300 Message-Id: X-Mailer: git-send-email 2.12.0 In-Reply-To: <7b6d42c0c5e1a04f8483b6546ea0b1db8fb7ceee.1505133966.git.shahafs@mellanox.com> References: <7b6d42c0c5e1a04f8483b6546ea0b1db8fb7ceee.1505133966.git.shahafs@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: HE1PR0401CA0079.eurprd04.prod.outlook.com (2603:10a6:3:19::47) To VI1PR05MB3151.eurprd05.prod.outlook.com (2603:10a6:802:1b::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7cbe58bd-6234-4d62-22f0-08d4fa954a5c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:VI1PR05MB3151; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 3:qqo4Jed2dLHVX48Mqdb6QboENZUN/LBTqv5OzcJVL+hkG+bzd5oMgyNY2GhEtgGivdD3jltNiBC3aABgmE/dUH0Ltags+SgqLlhFOUbLi6tGFGdgwmTNWOwSN4q2ejV30HlOXkOh39k3uzvKY7nJ+Fau51smn1xy2I/Bd72ji74Mv8gjecrnlpXYZs0ewopQVv8BH3YjynMQOeKGia5D9r3R7zWFDXvMzRVoxSsKgQZ/DmwAyAlcD0tVrjGadMr8; 25:FnqEiAK87XbDvJPNDqHYVNp3Q/Ew1gUkLHYVM8/zvANJSTk50lrcZMcrQ+lwvVs3pTcx18WSptvKqY2G0G9aRKkbeNK+b/g3yNzBZ00htgIy/GUp9wZ9KY6U3M+oqRBZ0bctHRrBGjQbkiSYUrcH/TnRCfybgHNPKIy1llBIDVSmNiy25oJ7FemwpQ9v3fUKXT1QXZKP6OMA3W8KOrm+QRgB9l1Nz34j7mZ+W13wr7CpXyhkpN1FzxDplg6cr1/6PTnDSTzbz3RDDENjN0xG+HLXBGf0M+PriGl6H0eSZkGNUm9TI+8CcDYNztKT37fBvXs+tX3p9JASgU8X7ypP6Q==; 31:++Zf0fe7FHokCZ2ih1WEoNEnmSXQgCb3q3kWU+x7xOySymqecoBhnLWn8nVUSU4RO73nftgt42nLGgdfJaPSUJ92FFp+pSH+L/ezcXhOaVPj27OW/dP/nXiRBok6qQQslZv8J8aEFl9e/lyhmaR1IHhzyk1HVynJLwb3s8VyquxzRAcPqpY9fRWVj42baslpdOqq0tPfv6X4eZ21YjAuQGXSmKk7oMUpEoL0DZNUHq8= X-MS-TrafficTypeDiagnostic: VI1PR05MB3151: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3151; 20:uQf6+PzGLdyAiINdgYbmu1UNP3UfUp3cj6GJuMtZd6n0OzkCg0atw0sOyjmyABJD0SMHBNfbL2zlqZ4+DW14tRGCDCg+jmp+Xl5LfYV7kA8Lhh81HhuKBKovWbdBiMvoWUI1cVU+lwc9hrw2kQpcenJgfbvzKvEtNoHt6h2K2AKCcg3DN7EXQJBXL6rK/Kd7nq9MV2ni89My8fqtWJlTLXY+Z1x5GiHJED4ZjGBAQJIffMMdU+3C+TJlX2KlXZ4ztqhxFVrE5uQwQWlh60aq9ysPTp99/uXgkQ6HQgEMHuXpKxUZ/BpwdZb5Z4sjebZgvM1qz7WKDav1rRKTOAR/ovg+kpcfU83vNV3M7WeBp6qqxGg/0AbfRU/rwNQ+/x1xDMv00Q311/uTzFXqdP3X6/r8uP5t8mVBB43TH2loi9DkDh7pIi030ndeAE1ncnXGzXqQEXJX3S3t7T6WnVlfUZUCu7rj4RXd9+NXSYZfCMaMiIZtz8qS74ZcA5+tSfxU; 4:EOkvo1/7WFXvXFmiQTWnj1RJfjmrm4tbGjEhB3V5NIXfqA5HgEJNoILuHkUivlSuJ4cy2SWHvq2+hikNnV/ofEAR2rt/qTeJr3W+eaC8rWfVk0NnJSE7AKBbskZHBhXueHodN0qMWv8XvPbzttxtPMQTOyFBlj2YmFEp/p//IRRSPCVAP53h1HEvOPAOEgVt6Qr0VKnOz3amv69P2t9ZFuczXtGlvAVI4l7kKuKlTdOL/zNnofKAEYdtxjj4TDDksv9PagWjoB0nG1z528cAfvMLppghcYZrJ1V1FzuGWGM= X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR05MB3151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR05MB3151; X-Forefront-PRVS: 042957ACD7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(346002)(39860400002)(376002)(366002)(199003)(189002)(21086003)(105586002)(86362001)(48376002)(50466002)(3846002)(6116002)(7736002)(69596002)(76176999)(50986999)(118296001)(25786009)(575784001)(66066001)(47776003)(478600001)(106356001)(101416001)(33026002)(55016002)(305945005)(53936002)(2950100002)(4326008)(6666003)(110136004)(5003940100001)(33646002)(50226002)(2906002)(68736007)(5660300001)(81166006)(81156014)(8676002)(189998001)(36756003)(7350300001)(316002)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3151; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3151; 23:HNFrWvuiUarjVyja8wINv+a5XVFUBRB6mbDCGizE0?= =?us-ascii?Q?kCfIAwiNT46kg1m0duWBj0qxzMBWCBQU2JDlAxwfPmEGbJHzAg4R1ZCBY71O?= =?us-ascii?Q?6qpxT1ParrVpYbNhFVHXfHihnV0eoRcX/yKvFwAGJ4ms2jAeLAoCacPSRN2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Rc7+TWWoMiL5Qw5+VT02SpEc3ILDK1+nUpo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2017 10:50:46.1018 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3151 Subject: [dpdk-stable] [PATCH v4 2/4] net/mlx5: fix Tx stats error counter definition X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 10:50:48 -0000 The current Tx error counter counts, according to its description, the total number of packets not sent when TX ring full. It is reported to application as part of oerrors field. The drop due to full ring is not the statistic that should be set on oerrors field. Such number can be counted by the application using the return value of the Tx burst function. The number that should be set there is the number of packets the device could not transmit in any way, even when it has resources. Therefore, replace this counter to count the total number of failed transmitted packets. Fixes: 87011737b715 ("mlx5: add software counters") Cc: stable@dpdk.org Cc: adrien.mazarguil@6wind.com Signed-off-by: Shahaf Shuler --- on v4: - Split fix Tx stats commit into 2 seperate patches. --- drivers/net/mlx5/mlx5_rxtx.h | 2 +- drivers/net/mlx5/mlx5_stats.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 033e70f25..107ada0f5 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -75,7 +75,7 @@ struct mlx5_txq_stats { uint64_t opackets; /**< Total of successfully sent packets. */ uint64_t obytes; /**< Total of successfully sent bytes. */ #endif - uint64_t odropped; /**< Total of packets not sent when TX ring full. */ + uint64_t oerrors; /**< Total number of failed transmitted packets. */ }; /* Flow director queue structure. */ diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index d443e1336..06348c8a1 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -360,13 +360,13 @@ mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) tmp.q_opackets[idx] += txq->stats.opackets; tmp.q_obytes[idx] += txq->stats.obytes; #endif - tmp.q_errors[idx] += txq->stats.odropped; + tmp.q_errors[idx] += txq->stats.oerrors; } #ifdef MLX5_PMD_SOFT_COUNTERS tmp.opackets += txq->stats.opackets; tmp.obytes += txq->stats.obytes; #endif - tmp.oerrors += txq->stats.odropped; + tmp.oerrors += txq->stats.oerrors; } #ifndef MLX5_PMD_SOFT_COUNTERS /* FIXME: retrieve and add hardware counters. */ -- 2.12.0