summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_resources.c
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2015-06-15 17:58:58 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-15 17:23:01 -0700
commit47d8417f5914012c794684f651213ffae1b91619 (patch)
tree7be5039f8dcfde0e3efe72e3b967316c7d5f9a58 /drivers/net/ethernet/mellanox/mlx4/en_resources.c
parentb72ca7e96acf7320c53c5d64d4518be1cf6d4ef3 (diff)
net/mlx4_core: Add sink counter
Reserve the last valid counter index for "sink" counter, when a new counter cannot be allocated, the driver will use this counter. In order to avoid allocating this counter on any other flow, fix the indices bitmap allocation range, and reserve the sink counter index. Add macro for the sink counter index and replace all appearences of the index with the macro. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_resources.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_resources.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_resources.c b/drivers/net/ethernet/mellanox/mlx4/en_resources.c
index 34f2fdf4fe5d..97bcb9135f8d 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_resources.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_resources.c
@@ -66,7 +66,7 @@ void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
context->pri_path.sched_queue |= user_prio << 3;
context->pri_path.feup = MLX4_FEUP_FORCE_ETH_UP;
}
- context->pri_path.counter_index = 0xff;
+ context->pri_path.counter_index = MLX4_SINK_COUNTER_INDEX(mdev->dev);
context->cqn_send = cpu_to_be32(cqn);
context->cqn_recv = cpu_to_be32(cqn);
context->db_rec_addr = cpu_to_be64(priv->res.db.dma << 2);