From patchwork Sat Sep 9 11:21:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 112149 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1470199qgf; Sat, 9 Sep 2017 04:19:13 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7tpWMeAl3NlPNp1bOucoQEV5yLWbv6VKtepHnxCV6eohRJIl7SQiDkHx2vn1S1kOeSwzQQ X-Received: by 10.223.195.108 with SMTP id e41mr4268542wrg.51.1504955953290; Sat, 09 Sep 2017 04:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504955953; cv=none; d=google.com; s=arc-20160816; b=eb0DXZri/itdeMi0bsd5lvW/lZvXb/ARefwy1dLChleVYeTkWMF0O/o+I27Rt0VJvk kGH8+rpo5+HMS7gn+7f8BMBfuLReqGpS/NqntcL5n59H2aq3+EnFTPL67JCqXiesCG9O w8LlvJlOYDWfi0d6B29PKiklAeVBnBbQZepr3dAm+/usp8QSiEnyN9GmJKRxTjXrVNek /3Clg6l70EPxStt2HqqO4/9rSa2LDAEANW9t2rS0GO4fut9Sh5jjQZgEyNTxHCKE7B+k ywxO4Xos/5xJBS9DYeORRfKHdUdo46ULj1GLzCmOZPYzUkJUNdrAtZTlZONbYEYsrHPA DK2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=kPqcYdc8YzhcxHd254VtlICGP8p9mXEuqdy9iGUGNI4=; b=I4IUg6JI2VOkjGGjt1FpMwgZTAlvt5Q62HZzquGM/b7eztcPjje1TfQt93VvoBlGUg t1rgLyKCwM4LiKwd+buGdYuGryDUBbS3RtwPyUWl/G3TnrcgMCkwJmAKURIbF+vu8BKP Tel+J5fma/DLRhTxkHqQH/ODQ9KbkMVhl3Z1Vg91f7ouvajjDIDl6qkxEHIKSxtcS4od GZZ/I0CjiOaX9linAuXZG5nFxB3nAC6F+8u3d0iYlF1XmKlhkikZpPYo6xhaQzx0Bu/t Bcz5i2HjEx2vnnMsfm6pUuxsgOlsV4/OmA1AMUd3nc4ricSzASJ/0fZW6wlV16Xq9+7p yguw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id q13si3130194wre.6.2017.09.09.04.19.13; Sat, 09 Sep 2017 04:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09FC11B29C; Sat, 9 Sep 2017 13:12:02 +0200 (CEST) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0083.outbound.protection.outlook.com [104.47.33.83]) by dpdk.org (Postfix) with ESMTP id 031C1567C for ; Sat, 9 Sep 2017 13:11:50 +0200 (CEST) Received: from BLUPR0301CA0004.namprd03.prod.outlook.com (10.162.113.142) by BY2PR03MB556.namprd03.prod.outlook.com (10.141.142.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Sat, 9 Sep 2017 11:11:49 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::118) by BLUPR0301CA0004.outlook.office365.com (2a01:111:e400:5259::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Sat, 9 Sep 2017 11:11:49 +0000 Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD047.mail.protection.outlook.com (10.1.15.175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1385.11 via Frontend Transport; Sat, 9 Sep 2017 11:11:48 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v89BAUhf026326; Sat, 9 Sep 2017 04:11:46 -0700 From: Shreyansh Jain To: CC: , Date: Sat, 9 Sep 2017 16:51:32 +0530 Message-ID: <20170909112132.13936-42-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170909112132.13936-1-shreyansh.jain@nxp.com> References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131494291085208505; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(77096006)(5003940100001)(189998001)(104016004)(47776003)(498600001)(36756003)(8676002)(50466002)(48376002)(97736004)(8936002)(356003)(6666003)(81166006)(81156014)(2906002)(4326008)(54906002)(1076002)(33646002)(86362001)(305945005)(5660300001)(50226002)(2950100002)(6916009)(110136004)(8656003)(2351001)(106466001)(68736007)(53936002)(76176999)(50986999)(105606002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB556; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD047; 1:qzIqrMjHrFg62n9T5wmThqh973xqpBXpuMSnKtVqGw6B85VEHVwJxrKFEzQNJTcnEQlbVZLUBPg+R8UOlxP9SJcMBrQt7KG8vFHq/F1+GzMv3hDoSjubDjRWmIkDUXML MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 08fad05d-5303-4405-2bb9-08d4f7739097 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR03MB556; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB556; 3:0eOMqWilMH4GeGREFga7us5/2hGRHxXTNGysCBTEirzITbDlAsKZjFzTBzp+mNMtUt/AgegLwnLevYsfdegEJ9ZqczMdwr2oUmdPGxKPfUYYkX5OLB4up/TbwTVbLlk2MH92aoKbq/IE9tiI8Q0QVWTYgjvHssPOP5EDu6EJolChOXAEJyNLJMzVL5XMh4BUcmV1vrvuVyvNZsR+yTY+3bP02TquFqBQHDHgIuPOfGfstGx8qhxx2VHUiNF/c7DxP5yg9dNDBSoccfmb3Q7+lJrQYH08wTGXdV+mBIT5QxRuBrSLkAWWihx1tgmHd2hfv9tu/o2VGHQXbrjLmZ4BF3Y0di1F6KQB/RfBHM7cfGo=; 25:GrLiV/B6E2nMZSygS0v+V0xBASNTjzXqB6mXqXsnONDjqJPcrJ+CTsXiYn8u0N2F70RGlm5iyN5clz+yHiPpjwOU0udtT5jl5IGNelf5hh5sOHinEeoS8o9XGqfzZGKULASXEJkalTOW6ChVx5GdjLQY9aCmQjVKktO2i1y9bxLgmjeJXDf0uTdoXEZwxBrZ1WDxIaehI8CMpTP+94Wjzq02Z/Ze1W9bIjzWKK7aZhZ0d/q3A+74IOegkWyi8X2SPL7RcK7aNFhyM2rAnMkdWvQgyccaznWnUs2Q3SWwSyWmJYz08KMVt/vHNTWicIWL53HCSDNkL7OB/myJoIImHA== X-MS-TrafficTypeDiagnostic: BY2PR03MB556: X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB556; 31:D/Qm872rsRl6RJgQnSiHvyx6cI3SB3aS6wCt8bGkt8t8Qn5xoNETTa5A1PlEGvxpWrRjUkLLOouYQCNjzLeje86J3gwfhfBbsFngSlyxh6kjxtdVgLDQ9E4GkIQdVOUtMIRDHl2r4rsxcgzbb2Gg6N75BCnPJpkHrVI78tILwWoM92T6Y6B8WIkLZE5P+S95KoCrLq3i1jzaQassHlvC4vmx5KtIGygDhgPNRoad+dA=; 4:7aEbQoGYBUjYKwn2wdQSgk9kILXcMc/aqN9mxbzzHRfAKmzbH0hwfLui3fhgUKypFrYuyq8wrnWlkOMUOlXssuc7khvNsefdeQw/dw+GLhSkXtclgwiTvPclw5RoCQN/6G0xHcyJ+VRTuHjQoxpmAPqD5CCTdmf5H1K+TC2nBlH/ofj9m7kUfVwKuazS9M9ova1pe4DqaYEtyGx6GIcIZIu93IHiN1SypWcmNOAE8rehOKc7hM9PpY+8iqjlNeXJ18XoDFdUwGPBmDwx2rnY6OBi/J0dvTToK2p3Jx7MQyU= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(20161123563025)(20161123561025)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR03MB556; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR03MB556; X-Forefront-PRVS: 0425A67DEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB556; 23:QK2J5uRx27OEV67tsHki4+EMctdOmse1Y7CqsM3So3?= 3kpaLro8iMcNVhmOe4QquCJoiEUzgxkMPLSlqyfv+rOCdPtkrwj/8lUzBNL/3a3qFaFDiQn0MAOglJOxyr5uY8op+PuvRR+J6e/TbG9UazDpSvtBpwQwHu8ZQ4ELxzQ85xrBJfqlNJStzoj+SWjaht5ZjxcLmgPey6WYJsMU5rIgm/Y8WMKL22vC6JyIP4J2elBka4Lw9i7rqIEoLviGCBzi7zTeepNPoeHbZBBi9DR6JzhhE/M6leeheHjKYm/iN3yZ0fkw6yRRsCglPx6zN6B6yXQmr/01dpvGco5l3Hy1qm5XdFxkLavR9zolO5lkh5H+C0wlAaPYMx6rxWjYrFb9G6pWh2PXAvy402kem2p7pXDfjWJhxIHnzXTjaogcJ71sdR0vjs2GVB8oiY4/06gOCfO6XjFRyHNhySyIGrFXi2F7yoyY3dm8MHHRtS0fmeSIqaKyVVmHf8RhGwHFc69oW7xLYtAh93fRs3IQkSTqrRtzvMZb8cIjwPgB4p3HrIaHxNd42XXHkTbBKKC9+q6FtUDps8SffAhvvXOw06KcpA0oQHWVr6utPpJougGcYQE88WCtbcqY5VzclOWY9whmFHYfQI2kl7rKSW+UFuY68Kfr9IUoQcE9dESexkO+MC0RAMjQZz+MZ/oAdnMPDj6xRYspzrysk6VNRiv7S1ZA26Kpqxv00d+8gD5xkFPGXtn6SyiikF5EycUORMGRmXlDdX3OoQbztLsMunmmsbKbCrd0x8gB7oMZ+PLClYgyjp82kZIO6cVT1V2u6K1PYbFRfpBstNe3S4CxnHY8juC2JEHFJkbmiNHTP2DXGRIoF2sy4EhGVnOFsLlyEQP/vRpPUB5i1/+RtWJs1EJ6KFJcxRc0nan43dt8ISzerbl8ch3JPYnB4SQLLArAv6JR0ZP8Hp3rvxHt0hAcpE4yIJCzXUNGPZBt2s3PdgHkBCzd2Y7hySCm3FBNgzxBKj5kylic+X5EbSfEkREhG5iT1aG5iw6HqgKWh5l8BB1MIgHU5KCCqMHa7urRPAY80SiMLfYSyTtb8qIZCVJ/pHFleGUcQOqRXfUvx9IhFjg6dWxZM= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB556; 6:A0bAMSueHEAa8z4MVL8kxDSj3xEBUeaXqvx5/fb0e3elKZ1K51dYZW/DnXsI3OB72SviuOgDRc45G7grHEs3iun3A+YntyoncUMruiOgfiXsVo7NrZHTriDeuwR+W8OkT1vK8ZcSfxek0GOagw7GXTM9J6cnCeK8rR8pE8FMI8kmb/wVnoMnYDJvXrs8vt4kaD8YkeapOB1jn12MCkhkDSsF+WSVQg/ArFAouzRcsJMhCWpLfkaVMAB2bC72UHXmOYGm7FruKEWCHo0uBveaQIvp0v5NkgsFZ/mHTOnkHI44OvPADQk3n7fVW3DytMGhD0Kv1EnPmgPW9o4nXIUhjA==; 5:YWijWC1oIXl8VQlZ8m9u0TDIIWYXn2j+rESdls5BrjxE3KX/pGPQ6IZKpm7K4/6bZK2vN1dDc6EHwSYhsHa6GzeiYO4POZBK1++tPuwx4UJjIc3ZFHxYDFgk0jpw4arEWP588ELKZDFCw+5TFbnzRw==; 24:0lyK/Q0zdFx8jfF70vVd+PVquGHjbfGP3Nvo5EHTT5ViNhMHpQOFuod1BmanQ66uUyJv1ODAV3pO2hT1ltfSpm2xiJCEqENE6z1SjGxBIeI=; 7:WWxkM7q0MKcyCwkg9uLj1mdDZdPTlilBBOFfGtpuzlVKkSGoNdUW5ngqOJo8Da6LFeQ50BhhSCzNBRXqjeEUm23Ycj5u653qp7bDYwkkll9ebChW/B0hXrxjF9Mr8J78V8Atkm97yegd7K2vaW9ibj4iFehc+xVJW01gwdKydU8aK6c1FK6byZ43nFPmsdDZmjKfbJjqcyPTdZkF+tP7MNdPPEDc0dcExuAE2M05I3E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2017 11:11:48.3336 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB556 Subject: [dpdk-dev] [PATCH v4 41/41] net/dpaa: support for extended 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" From: Hemant Agrawal Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa.ini | 1 + drivers/net/dpaa/dpaa_ethdev.c | 143 ++++++++++++++++++++++++++++++++++++++ drivers/net/dpaa/dpaa_ethdev.h | 40 +++++++++++ 3 files changed, 184 insertions(+) -- 2.9.3 diff --git a/doc/guides/nics/features/dpaa.ini b/doc/guides/nics/features/dpaa.ini index 09b9bd9..24cfd85 100644 --- a/doc/guides/nics/features/dpaa.ini +++ b/doc/guides/nics/features/dpaa.ini @@ -18,6 +18,7 @@ L3 checksum offload = Y L4 checksum offload = Y Packet type parsing = Y Basic stats = Y +Extended stats = Y FW version = Y ARMv8 = Y Usage doc = Y diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 22f56a4..5b5ec9c 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -75,6 +75,40 @@ /* Keep track of whether QMAN and BMAN have been globally initialized */ static int is_global_init; +struct rte_dpaa_xstats_name_off { + char name[RTE_ETH_XSTATS_NAME_SIZE]; + uint32_t offset; +}; + +static const struct rte_dpaa_xstats_name_off dpaa_xstats_strings[] = { + {"rx_align_err", + offsetof(struct dpaa_if_stats, raln)}, + {"rx_valid_pause", + offsetof(struct dpaa_if_stats, rxpf)}, + {"rx_fcs_err", + offsetof(struct dpaa_if_stats, rfcs)}, + {"rx_vlan_frame", + offsetof(struct dpaa_if_stats, rvlan)}, + {"rx_frame_err", + offsetof(struct dpaa_if_stats, rerr)}, + {"rx_drop_err", + offsetof(struct dpaa_if_stats, rdrp)}, + {"rx_undersized", + offsetof(struct dpaa_if_stats, rund)}, + {"rx_oversize_err", + offsetof(struct dpaa_if_stats, rovr)}, + {"rx_fragment_pkt", + offsetof(struct dpaa_if_stats, rfrg)}, + {"tx_valid_pause", + offsetof(struct dpaa_if_stats, txpf)}, + {"tx_fcs_err", + offsetof(struct dpaa_if_stats, terr)}, + {"tx_vlan_frame", + offsetof(struct dpaa_if_stats, tvlan)}, + {"rx_undersized", + offsetof(struct dpaa_if_stats, tund)}, +}; + static int dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) { @@ -268,6 +302,110 @@ static void dpaa_eth_stats_reset(struct rte_eth_dev *dev) fman_if_stats_reset(dpaa_intf->fif); } +static int +dpaa_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats, + unsigned int n) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + unsigned int i = 0, num = RTE_DIM(dpaa_xstats_strings); + uint64_t values[sizeof(struct dpaa_if_stats) / 8]; + + if (xstats == NULL) + return 0; + + if (n < num) + return num; + + fman_if_stats_get_all(dpaa_intf->fif, values, + sizeof(struct dpaa_if_stats) / 8); + + for (i = 0; i < num; i++) { + xstats[i].id = i; + xstats[i].value = values[dpaa_xstats_strings[i].offset / 8]; + } + return i; +} + +static int +dpaa_xstats_get_names(__rte_unused struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, + __rte_unused unsigned int limit) +{ + unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); + + if (xstats_names != NULL) + for (i = 0; i < stat_cnt; i++) + snprintf(xstats_names[i].name, + sizeof(xstats_names[i].name), + "%s", + dpaa_xstats_strings[i].name); + + return stat_cnt; +} + +static int +dpaa_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, + uint64_t *values, unsigned int n) +{ + unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); + uint64_t values_copy[sizeof(struct dpaa_if_stats) / 8]; + + if (!ids) { + struct dpaa_if *dpaa_intf = dev->data->dev_private; + + if (n < stat_cnt) + return stat_cnt; + + if (!values) + return 0; + + fman_if_stats_get_all(dpaa_intf->fif, values_copy, + sizeof(struct dpaa_if_stats)); + + for (i = 0; i < stat_cnt; i++) + values[i] = + values_copy[dpaa_xstats_strings[i].offset / 8]; + + return stat_cnt; + } + + dpaa_xstats_get_by_id(dev, NULL, values_copy, stat_cnt); + + for (i = 0; i < n; i++) { + if (ids[i] >= stat_cnt) { + DPAA_PMD_ERR("id value isn't valid"); + return -1; + } + values[i] = values_copy[ids[i]]; + } + return n; +} + +static int +dpaa_xstats_get_names_by_id( + struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, + const uint64_t *ids, + unsigned int limit) +{ + unsigned int i, stat_cnt = RTE_DIM(dpaa_xstats_strings); + struct rte_eth_xstat_name xstats_names_copy[stat_cnt]; + + if (!ids) + return dpaa_xstats_get_names(dev, xstats_names, limit); + + dpaa_xstats_get_names(dev, xstats_names_copy, limit); + + for (i = 0; i < limit; i++) { + if (ids[i] >= stat_cnt) { + DPAA_PMD_ERR("id value isn't valid"); + return -1; + } + strcpy(xstats_names[i].name, xstats_names_copy[ids[i]].name); + } + return limit; +} + static void dpaa_eth_promiscuous_enable(struct rte_eth_dev *dev) { struct dpaa_if *dpaa_intf = dev->data->dev_private; @@ -535,6 +673,11 @@ static struct eth_dev_ops dpaa_devops = { .link_update = dpaa_eth_link_update, .stats_get = dpaa_eth_stats_get, + .xstats_get = dpaa_dev_xstats_get, + .xstats_get_by_id = dpaa_xstats_get_by_id, + .xstats_get_names_by_id = dpaa_xstats_get_names_by_id, + .xstats_get_names = dpaa_xstats_get_names, + .xstats_reset = dpaa_eth_stats_reset, .stats_reset = dpaa_eth_stats_reset, .promiscuous_enable = dpaa_eth_promiscuous_enable, .promiscuous_disable = dpaa_eth_promiscuous_disable, diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index e1e062e..3f06d63 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -134,4 +134,44 @@ struct dpaa_if { struct rte_eth_fc_conf *fc_conf; }; +struct dpaa_if_stats { + /* Rx Statistics Counter */ + uint64_t reoct; /**