mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Hadar Hen Zion <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
b72ca7e96a
commit
47d8417f59
4 changed files with 11 additions and 6 deletions
|
|
@ -1544,7 +1544,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
|
|||
dev->counters[qp->port - 1];
|
||||
optpar |= MLX4_QP_OPTPAR_COUNTER_INDEX;
|
||||
} else
|
||||
context->pri_path.counter_index = 0xff;
|
||||
context->pri_path.counter_index =
|
||||
MLX4_SINK_COUNTER_INDEX(dev->dev);
|
||||
|
||||
if (qp->flags & MLX4_IB_QP_NETIF) {
|
||||
mlx4_ib_steer_qp_reg(dev, qp, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue