From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Or Gerlitz <ogerlitz@mellanox.com>,
"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Matan Barak <matanb@mellanox.com>,
Amir Vadai <amirv@mellanox.com>, Tal Alon <talal@mellanox.com>,
Ido Shamay <idos@mellanox.com>
Subject: Re: [PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ
Date: Thu, 28 May 2015 22:41:37 +0300 [thread overview]
Message-ID: <55676F71.7070104@cogentembedded.com> (raw)
In-Reply-To: <1432827676-5599-5-git-send-email-ogerlitz@mellanox.com>
Hello.
On 05/28/2015 06:41 PM, Or Gerlitz wrote:
> From: Matan Barak <matanb@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 <matanb@mellanox.com>
> Signed-off-by: Ido Shamay <idos@mellanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@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
next prev parent reply other threads:[~2015-05-28 19:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 15:41 [PATCH net-next 0/4] mlx4 driver update, May 28, 2015 Or Gerlitz
2015-05-28 15:41 ` [PATCH net-next 1/4] net/mlx4_core: Demote simple multicast and broadcast flow steering rules Or Gerlitz
2015-05-28 15:41 ` [PATCH net-next 2/4] net/mlx4: Add EQ pool Or Gerlitz
2015-05-28 15:41 ` [PATCH net-next 3/4] net/mlx4_core: Move affinity hints to mlx4_core ownership Or Gerlitz
2015-05-28 15:41 ` [PATCH net-next 4/4] net/mlx4_core: Make sure there are no pending async events when freeing CQ Or Gerlitz
2015-05-28 19:41 ` Sergei Shtylyov [this message]
2015-05-31 6:23 ` David Miller
2015-05-31 6:30 ` Or Gerlitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55676F71.7070104@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=idos@mellanox.com \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=talal@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.