Re: [PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ

2015-05-31 Thread Or Gerlitz

On 5/31/2015 9:23 AM, David Miller wrote:

I agree with Sergei that one empty line is sufficient here, don't make
it into two.

Please respin with this fixed.


Sure, I prepared V1 to address that earlier today, and will send it now.

Or.

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ

2015-05-31 Thread David Miller
From: Or Gerlitz ogerl...@mellanox.com
Date: Thu, 28 May 2015 18:41:16 +0300

 @@ -369,6 +369,10 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq 
 *cq)
   mlx4_warn(dev, HW2SW_CQ failed (%d) for CQN %06x\n, err, 
 cq-cqn);
  
   
 synchronize_irq(priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq);
 + if (priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq !=
 + priv-eq_table.eq[MLX4_EQ_ASYNC].irq)
 + synchronize_irq(priv-eq_table.eq[MLX4_EQ_ASYNC].irq);
 +
  
   spin_lock_irq(cq_table-lock);
   radix_tree_delete(cq_table-tree, cq-cqn);

I agree with Sergei that one empty line is sufficient here, don't make
it into two.

Please respin with this fixed.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ

2015-05-28 Thread Sergei Shtylyov

Hello.

On 05/28/2015 06:41 PM, Or Gerlitz wrote:


From: Matan Barak mat...@mellanox.com



When freeing a CQ, we need to make sure there are no
asynchronous events (on the ASYNC EQ) that could
relate to this CQ before freeing it.



This is done by introducing synchronize_irq.



Signed-off-by: Matan Barak mat...@mellanox.com
Signed-off-by: Ido Shamay i...@mellanox.com
Signed-off-by: Or Gerlitz ogerl...@mellanox.com
---
  drivers/net/ethernet/mellanox/mlx4/cq.c |4 
  1 files changed, 4 insertions(+), 0 deletions(-)



diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c 
b/drivers/net/ethernet/mellanox/mlx4/cq.c
index 7431cd4..1fc1dc5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
@@ -369,6 +369,10 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
mlx4_warn(dev, HW2SW_CQ failed (%d) for CQN %06x\n, err, 
cq-cqn);


synchronize_irq(priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq);
+   if (priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq !=
+   priv-eq_table.eq[MLX4_EQ_ASYNC].irq)
+   synchronize_irq(priv-eq_table.eq[MLX4_EQ_ASYNC].irq);
+



   I think one empty line was enough.


spin_lock_irq(cq_table-lock);
radix_tree_delete(cq_table-tree, cq-cqn);


WBR, Sergei

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ

2015-05-28 Thread Or Gerlitz
From: Matan Barak mat...@mellanox.com

When freeing a CQ, we need to make sure there are no
asynchronous events (on the ASYNC EQ) that could
relate to this CQ before freeing it.

This is done by introducing synchronize_irq.

Signed-off-by: Matan Barak mat...@mellanox.com
Signed-off-by: Ido Shamay i...@mellanox.com
Signed-off-by: Or Gerlitz ogerl...@mellanox.com
---
 drivers/net/ethernet/mellanox/mlx4/cq.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c 
b/drivers/net/ethernet/mellanox/mlx4/cq.c
index 7431cd4..1fc1dc5 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
@@ -369,6 +369,10 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
mlx4_warn(dev, HW2SW_CQ failed (%d) for CQN %06x\n, err, 
cq-cqn);
 

synchronize_irq(priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq);
+   if (priv-eq_table.eq[MLX4_CQ_TO_EQ_VECTOR(cq-vector)].irq !=
+   priv-eq_table.eq[MLX4_EQ_ASYNC].irq)
+   synchronize_irq(priv-eq_table.eq[MLX4_EQ_ASYNC].irq);
+
 
spin_lock_irq(cq_table-lock);
radix_tree_delete(cq_table-tree, cq-cqn);
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html