net/mlx5e: Add new counter for aRFS rule insertion failures
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 8 Jul 2018 11:43:19 +0000 (14:43 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 3 Oct 2018 23:17:59 +0000 (16:17 -0700)
Count aRFS rules insertion failure for ethtool output. In addition, move
the error print into debug prints mechanism, as it could flood the dmesg
and reduce system BW dramatically.

Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h

index 45cdde694d20049af85391ffcc376438fadb921e..8657e0f26995b442545dabd3b7b8d5b299b5a380 100644 (file)
@@ -543,8 +543,11 @@ static struct mlx5_flow_handle *arfs_add_rule(struct mlx5e_priv *priv,
        rule = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1);
        if (IS_ERR(rule)) {
                err = PTR_ERR(rule);
-               netdev_err(priv->netdev, "%s: add rule(filter id=%d, rq idx=%d) failed, err=%d\n",
-                          __func__, arfs_rule->filter_id, arfs_rule->rxq, err);
+               priv->channel_stats[arfs_rule->rxq].rq.arfs_err++;
+               mlx5e_dbg(HW, priv,
+                         "%s: add rule(filter id=%d, rq idx=%d, ip proto=0x%x) failed,err=%d\n",
+                         __func__, arfs_rule->filter_id, arfs_rule->rxq,
+                         tuple->ip_proto, err);
        }
 
 out:
index 90c7607b1f44dfbad303de1b3b5791f2c89c0516..b7d4896c7c7b2c6176d593df72468c1018a21e1f 100644 (file)
@@ -93,6 +93,7 @@ static const struct counter_desc sw_stats_desc[] = {
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_cache_busy) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_cache_waive) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_congst_umr) },
+       { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_arfs_err) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, ch_events) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, ch_poll) },
        { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, ch_arm) },
@@ -170,6 +171,7 @@ void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv)
                s->rx_cache_busy  += rq_stats->cache_busy;
                s->rx_cache_waive += rq_stats->cache_waive;
                s->rx_congst_umr  += rq_stats->congst_umr;
+               s->rx_arfs_err    += rq_stats->arfs_err;
                s->ch_events      += ch_stats->events;
                s->ch_poll        += ch_stats->poll;
                s->ch_arm         += ch_stats->arm;
@@ -1161,6 +1163,7 @@ static const struct counter_desc rq_stats_desc[] = {
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, cache_busy) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, cache_waive) },
        { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, congst_umr) },
+       { MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, arfs_err) },
 };
 
 static const struct counter_desc sq_stats_desc[] = {
index a5fb3dc27f5003ee92bdd7b21258266f3224d07c..77f74ce11280e26a461343adc92e56d63b387812 100644 (file)
@@ -106,6 +106,7 @@ struct mlx5e_sw_stats {
        u64 rx_cache_busy;
        u64 rx_cache_waive;
        u64 rx_congst_umr;
+       u64 rx_arfs_err;
        u64 ch_events;
        u64 ch_poll;
        u64 ch_arm;
@@ -202,6 +203,7 @@ struct mlx5e_rq_stats {
        u64 cache_busy;
        u64 cache_waive;
        u64 congst_umr;
+       u64 arfs_err;
 };
 
 struct mlx5e_sq_stats {