]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i40e/i40evf: Add stats to track FD ATR and SB dynamic enable state
authorAnjali Singhai Jain <anjali.singhai@intel.com>
Wed, 22 Apr 2015 23:34:05 +0000 (19:34 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 15 Jul 2015 01:26:40 +0000 (18:26 -0700)
Since the driver can dynamically enable/disable FD ATR and SB features,
these stats help keep track of the current state and along with
fd_flush count provide a means to debug what could be going on
with the flow director filters. This will take away the need for
being verbose in our debug logs with respect to FD.

Change-ID: I29224f750fe6602391043655d18996570720377d
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index 9a68c65b17ea03bd00642aab5fe3b2e5a5066765..0b68f61eeb0c0c07b89e30bf021049526e9e025d 100644 (file)
@@ -148,7 +148,9 @@ static struct i40e_stats i40e_gstrings_stats[] = {
        I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
        I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
        I40E_PF_STAT("fdir_atr_tunnel_match", stats.fd_atr_tunnel_match),
+       I40E_PF_STAT("fdir_atr_status", stats.fd_atr_status),
        I40E_PF_STAT("fdir_sb_match", stats.fd_sb_match),
+       I40E_PF_STAT("fdir_sb_status", stats.fd_sb_status),
 
        /* LPI stats */
        I40E_PF_STAT("tx_lpi_status", stats.tx_lpi_status),
index b44eb357cff7eb6917461b057c5d5e3f312d82f3..b5fc6544fb69a3092f035fe17ca7fcda8bc0290d 100644 (file)
@@ -1123,6 +1123,18 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
                           pf->stat_offsets_loaded,
                           &osd->rx_lpi_count, &nsd->rx_lpi_count);
 
+       if (pf->flags & I40E_FLAG_FD_SB_ENABLED &&
+           !(pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED))
+               nsd->fd_sb_status = true;
+       else
+               nsd->fd_sb_status = false;
+
+       if (pf->flags & I40E_FLAG_FD_ATR_ENABLED &&
+           !(pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED))
+               nsd->fd_atr_status = true;
+       else
+               nsd->fd_atr_status = false;
+
        pf->stat_offsets_loaded = true;
 }
 
index 9a5a75b1e2bc053b50bec13adde2fd3aa4848595..350c5ee85ec393541002a5e64613a3ea3c0af1cc 100644 (file)
@@ -1134,6 +1134,8 @@ struct i40e_hw_port_stats {
        u64 fd_atr_match;
        u64 fd_sb_match;
        u64 fd_atr_tunnel_match;
+       u32 fd_atr_status;
+       u32 fd_sb_status;
        /* EEE LPI */
        u32 tx_lpi_status;
        u32 rx_lpi_status;
index c463ec41579c708ffbe606ea0b31ca0485ea4c58..068813d3c7a30e752d15c4340a1027bceda31bbc 100644 (file)
@@ -1109,6 +1109,8 @@ struct i40e_hw_port_stats {
        u64 fd_atr_match;
        u64 fd_sb_match;
        u64 fd_atr_tunnel_match;
+       u32 fd_atr_status;
+       u32 fd_sb_status;
        /* EEE LPI */
        u32 tx_lpi_status;
        u32 rx_lpi_status;