[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1326916457.2742.0.camel@edumazet-laptop>
Date: Wed, 18 Jan 2012 20:54:17 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Cc: davem@...emloft.net, netdev@...r.kernel.org, eugenia@...lanox.co.il
Subject: Re: [PATCH net 3/6] mlx4_en: eth statistics modification
Le mercredi 18 janvier 2012 à 21:41 +0200, Yevgeny Petrilin a écrit :
> From: Eugenia Emantayev <eugenia@...lanox.co.il>
>
> In native mode display all available statistics.
> In SRIOV mode on VF display only SW counters statistics,
> in SRIOV mode on hypervisor display SW counters and errors (got from FW)
> statistics.
>
> Signed-off-by: Eugenia Emantayev <eugenia@...lanox.co.il>
> Reviewed-by: Yevgeny Petrilin <yevgenyp@...lanox.co.il>
> ---
> drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 72 ++++++++++++++++++-----
> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +
> drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 +
> drivers/net/ethernet/mellanox/mlx4/port.c | 21 +++++++
> include/linux/mlx4/device.h | 1 +
> 5 files changed, 81 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index 53c6686..0e5f275 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -183,10 +183,17 @@ static int mlx4_en_set_wol(struct net_device *netdev,
> static int mlx4_en_get_sset_count(struct net_device *dev, int sset)
> {
> struct mlx4_en_priv *priv = netdev_priv(dev);
> + u64 bm = priv->stats_bitmap;
> + int bit_count = 0;
>
> switch (sset) {
> case ETH_SS_STATS:
> - return NUM_ALL_STATS +
> + while (bm) {
> + if (bm & 1)
> + bit_count++;
> + bm >>= 1;
> + }
hweight64(bm) ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists