liquidio: support new firmware statistic fw_err_pki
authorRick Farrington <ricardo.farrington@cavium.com>
Mon, 17 Jul 2017 20:33:14 +0000 (13:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jul 2017 20:22:29 +0000 (13:22 -0700)
Added support for new firmware statistic 'tx_err_pki'.

Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: Derek Chickles <derek.chickles@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
drivers/net/ethernet/cavium/liquidio/liquidio_common.h

index 28ecda3d34049342b6e58c108dd22679cb4ad8cc..976a50f6755189f7f1cda4a27c63d733226040ec 100644 (file)
@@ -105,6 +105,7 @@ static const char oct_stats_strings[][ETH_GSTRING_LEN] = {
        "tx_total_sent",
        "tx_total_fwd",
        "tx_err_pko",
+       "tx_err_pki",
        "tx_err_link",
        "tx_err_drop",
 
@@ -826,6 +827,8 @@ lio_get_ethtool_stats(struct net_device *netdev,
        data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_total_fwd);
        /*per_core_stats[j].link_stats[i].fromhost.fw_err_pko */
        data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_pko);
+       /*per_core_stats[j].link_stats[i].fromhost.fw_err_pki */
+       data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_pki);
        /*per_core_stats[j].link_stats[i].fromhost.fw_err_link */
        data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_link);
        /*per_core_stats[cvmx_get_core_num()].link_stats[idx].fromhost.
@@ -1568,6 +1571,7 @@ octnet_nic_stats_callback(struct octeon_device *oct_dev,
                tstats->fw_total_sent = rsp_tstats->fw_total_sent;
                tstats->fw_total_fwd = rsp_tstats->fw_total_fwd;
                tstats->fw_err_pko = rsp_tstats->fw_err_pko;
+               tstats->fw_err_pki = rsp_tstats->fw_err_pki;
                tstats->fw_err_link = rsp_tstats->fw_err_link;
                tstats->fw_err_drop = rsp_tstats->fw_err_drop;
                tstats->fw_tso = rsp_tstats->fw_tso;
index 231dd7fbfb8071b5df43cdcc9ae1bab2293c5622..53aaf417e7226bbd311ece2ea8a9f0edafbff5a9 100644 (file)
@@ -814,6 +814,7 @@ struct nic_tx_stats {
        u64 fw_tso;             /* number of tso requests */
        u64 fw_tso_fwd;         /* number of packets segmented in tso */
        u64 fw_tx_vxlan;
+       u64 fw_err_pki;
 };
 
 struct oct_link_stats {