|
@@ -199,6 +199,10 @@ static const char main_strings[][ETH_GSTRING_LEN] = {
|
|
"rx_xdp_drop",
|
|
"rx_xdp_drop",
|
|
"rx_xdp_tx",
|
|
"rx_xdp_tx",
|
|
"rx_xdp_tx_full",
|
|
"rx_xdp_tx_full",
|
|
|
|
+
|
|
|
|
+ /* phy statistics */
|
|
|
|
+ "rx_packets_phy", "rx_bytes_phy",
|
|
|
|
+ "tx_packets_phy", "tx_bytes_phy",
|
|
};
|
|
};
|
|
|
|
|
|
static const char mlx4_en_test_names[][ETH_GSTRING_LEN]= {
|
|
static const char mlx4_en_test_names[][ETH_GSTRING_LEN]= {
|
|
@@ -411,6 +415,10 @@ static void mlx4_en_get_ethtool_stats(struct net_device *dev,
|
|
if (bitmap_iterator_test(&it))
|
|
if (bitmap_iterator_test(&it))
|
|
data[index++] = ((unsigned long *)&priv->xdp_stats)[i];
|
|
data[index++] = ((unsigned long *)&priv->xdp_stats)[i];
|
|
|
|
|
|
|
|
+ for (i = 0; i < NUM_PHY_STATS; i++, bitmap_iterator_inc(&it))
|
|
|
|
+ if (bitmap_iterator_test(&it))
|
|
|
|
+ data[index++] = ((unsigned long *)&priv->phy_stats)[i];
|
|
|
|
+
|
|
for (i = 0; i < priv->tx_ring_num[TX]; i++) {
|
|
for (i = 0; i < priv->tx_ring_num[TX]; i++) {
|
|
data[index++] = priv->tx_ring[TX][i]->packets;
|
|
data[index++] = priv->tx_ring[TX][i]->packets;
|
|
data[index++] = priv->tx_ring[TX][i]->bytes;
|
|
data[index++] = priv->tx_ring[TX][i]->bytes;
|
|
@@ -490,6 +498,12 @@ static void mlx4_en_get_strings(struct net_device *dev,
|
|
strcpy(data + (index++) * ETH_GSTRING_LEN,
|
|
strcpy(data + (index++) * ETH_GSTRING_LEN,
|
|
main_strings[strings]);
|
|
main_strings[strings]);
|
|
|
|
|
|
|
|
+ for (i = 0; i < NUM_PHY_STATS; i++, strings++,
|
|
|
|
+ bitmap_iterator_inc(&it))
|
|
|
|
+ if (bitmap_iterator_test(&it))
|
|
|
|
+ strcpy(data + (index++) * ETH_GSTRING_LEN,
|
|
|
|
+ main_strings[strings]);
|
|
|
|
+
|
|
for (i = 0; i < priv->tx_ring_num[TX]; i++) {
|
|
for (i = 0; i < priv->tx_ring_num[TX]; i++) {
|
|
sprintf(data + (index++) * ETH_GSTRING_LEN,
|
|
sprintf(data + (index++) * ETH_GSTRING_LEN,
|
|
"tx%d_packets", i);
|
|
"tx%d_packets", i);
|