From patchwork Mon Oct 8 08:25:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahaf Shuler X-Patchwork-Id: 46236 X-Patchwork-Delegate: shahafs@mellanox.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9447C4CAB; Mon, 8 Oct 2018 10:25:47 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2EAE04CA0 for ; Mon, 8 Oct 2018 10:25:44 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Oct 2018 10:30:26 +0200 Received: from unicorn01.mtl.labs.mlnx. (unicorn01.mtl.labs.mlnx [10.7.12.62]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w988Pcn9019636; Mon, 8 Oct 2018 11:25:38 +0300 From: Shahaf Shuler To: yskoh@mellanox.com Cc: xuemingl@mellanox.com, rasland@mellanox.com, dev@dpdk.org, stable@dpdk.org Date: Mon, 8 Oct 2018 11:25:22 +0300 Message-Id: <44fd5f67f73f583e694623abe05a83c2a5c346c0.1538986272.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH 2/3] net/mlx5: add representor specific statistics 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Representor ports has a different set of extended statistics (as those are logical ports which cannot count all that the PF can). Cc: stable@dpdk.org Cc: xuemingl@mellanox.com Signed-off-by: Shahaf Shuler --- drivers/net/mlx5/mlx5_stats.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index 26e0a716f1..f1600342f8 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -107,6 +107,23 @@ static const struct mlx5_counter_ctrl mlx5_counters_init[] = { .dpdk_name = "rx_bytes_phy", .ctr_name = "rx_bytes_phy", }, + /* Representor only */ + { + .dpdk_name = "rx_packets", + .ctr_name = "vport_rx_packets", + }, + { + .dpdk_name = "rx_bytes", + .ctr_name = "vport_rx_bytes", + }, + { + .dpdk_name = "tx_packets", + .ctr_name = "vport_tx_packets", + }, + { + .dpdk_name = "tx_bytes", + .ctr_name = "vport_tx_bytes", + }, }; static const unsigned int xstats_n = RTE_DIM(mlx5_counters_init);