Thread (5 messages) 5 messages, 1 author, 2017-12-13

Re: [PATCH net 2/3] net/mlx4_core: Fix wrong calculation of free counters

From: Tariq Toukan <hidden>
Date: 2017-12-13 16:07:42


On 13/12/2017 10:30 AM, Tariq Toukan wrote:
From: Eran Ben Elisha <redacted>

The field res_free indicates the total number of counters which are free
to allocation (reserved and unreserved). Fix a bug of reducing the
reserved counters from this field before allocation.

Due to this bug, free counters which are not reserved couldn't be
allocated, fixed it.

Fixes: 9de92c60beaa ("net/mlx4_core: Adjust counter grant policy in the resource tracker")
Signed-off-by: Eran Ben Elisha <redacted>
Signed-off-by: Tariq Toukan <redacted>
I forgot to mention a reviewer for this patch, and would edit the commit 
message as well.

I'll send a re-spin shortly.
quoted hunk ↗ jump to hunk
---
  drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 -
  1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 04304dd894c6..606a0e0beeae 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -611,7 +611,6 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
  						MLX4_MAX_PORTS;
  				else
  					res_alloc->guaranteed[t] = 0;
-				res_alloc->res_free -= res_alloc->guaranteed[t];
  				break;
  			default:
  				break;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help