Commit 46e93e54 authored by Madalin Bucur's avatar Madalin Bucur Committed by David S. Miller

dpaa_eth: add dropped frames to percpu ethtool stats

Prior to this change, the frames dropped on receive or transmit
were not displayed in the ethtool statistics, leaving the dropped
frames unaccounted for.
Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84d06c60
...@@ -47,6 +47,8 @@ static const char dpaa_stats_percpu[][ETH_GSTRING_LEN] = { ...@@ -47,6 +47,8 @@ static const char dpaa_stats_percpu[][ETH_GSTRING_LEN] = {
"tx S/G", "tx S/G",
"tx error", "tx error",
"rx error", "rx error",
"rx dropped",
"tx dropped",
}; };
static char dpaa_stats_global[][ETH_GSTRING_LEN] = { static char dpaa_stats_global[][ETH_GSTRING_LEN] = {
...@@ -262,6 +264,12 @@ static void copy_stats(struct dpaa_percpu_priv *percpu_priv, int num_cpus, ...@@ -262,6 +264,12 @@ static void copy_stats(struct dpaa_percpu_priv *percpu_priv, int num_cpus,
data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_errors; data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_errors;
data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_errors; data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_errors;
data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_dropped;
data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_dropped;
data[crr * num_values + crr_cpu] = percpu_priv->stats.tx_dropped;
data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_dropped;
data[crr * num_values + crr_cpu] = bp_count; data[crr * num_values + crr_cpu] = bp_count;
data[crr++ * num_values + num_cpus] += bp_count; data[crr++ * num_values + num_cpus] += bp_count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment