DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion
@ 2020-09-02  8:34 Matan Azrad
  2020-09-18 10:33 ` Maxime Coquelin
  2020-09-18 12:29 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: Matan Azrad @ 2020-09-02  8:34 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, stable

The CQ configuration enables the collapse feature in HW what cause HW to
write all the completions in the first CQE.
When this feature is enabled the HW doesn't switch the owner bit when it
starts a new cycle of the CQ, not like working without the collapse
feature.

The current SW CQ polling wrongly added an assertion to validate the
owner bit switch what causes a panic in debug mode.

Remove the aforementioned assertion.

Fixes: c5f714e50b0e ("vdpa/mlx5: optimize completion queue poll")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 5a2d4fb..742ee62 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -205,8 +205,6 @@
 	comp = (cur_wqe_counter + 1u - next_wqe_counter) & cq_mask;
 	if (comp) {
 		cq->cq_ci += comp;
-		MLX5_ASSERT(!!(cq->cq_ci & cq_size) ==
-			    MLX5_CQE_OWNER(last_word.op_own));
 		MLX5_ASSERT(MLX5_CQE_OPCODE(last_word.op_own) !=
 			    MLX5_CQE_INVALID);
 		if (unlikely(!(MLX5_CQE_OPCODE(last_word.op_own) ==
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion
  2020-09-02  8:34 [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion Matan Azrad
@ 2020-09-18 10:33 ` Maxime Coquelin
  2020-09-18 12:29 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-09-18 10:33 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable



On 9/2/20 10:34 AM, Matan Azrad wrote:
> The CQ configuration enables the collapse feature in HW what cause HW to
> write all the completions in the first CQE.
> When this feature is enabled the HW doesn't switch the owner bit when it
> starts a new cycle of the CQ, not like working without the collapse
> feature.
> 
> The current SW CQ polling wrongly added an assertion to validate the
> owner bit switch what causes a panic in debug mode.
> 
> Remove the aforementioned assertion.
> 
> Fixes: c5f714e50b0e ("vdpa/mlx5: optimize completion queue poll")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Xueming Li <xuemingl@nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> index 5a2d4fb..742ee62 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> @@ -205,8 +205,6 @@
>  	comp = (cur_wqe_counter + 1u - next_wqe_counter) & cq_mask;
>  	if (comp) {
>  		cq->cq_ci += comp;
> -		MLX5_ASSERT(!!(cq->cq_ci & cq_size) ==
> -			    MLX5_CQE_OWNER(last_word.op_own));
>  		MLX5_ASSERT(MLX5_CQE_OPCODE(last_word.op_own) !=
>  			    MLX5_CQE_INVALID);
>  		if (unlikely(!(MLX5_CQE_OPCODE(last_word.op_own) ==
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion
  2020-09-02  8:34 [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion Matan Azrad
  2020-09-18 10:33 ` Maxime Coquelin
@ 2020-09-18 12:29 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2020-09-18 12:29 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev, stable



On 9/2/20 10:34 AM, Matan Azrad wrote:
> The CQ configuration enables the collapse feature in HW what cause HW to
> write all the completions in the first CQE.
> When this feature is enabled the HW doesn't switch the owner bit when it
> starts a new cycle of the CQ, not like working without the collapse
> feature.
> 
> The current SW CQ polling wrongly added an assertion to validate the
> owner bit switch what causes a panic in debug mode.
> 
> Remove the aforementioned assertion.
> 
> Fixes: c5f714e50b0e ("vdpa/mlx5: optimize completion queue poll")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matan Azrad <matan@nvidia.com>
> Acked-by: Xueming Li <xuemingl@nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02  8:34 [dpdk-dev] [PATCH] vdpa/mlx5: fix completion queue assertion Matan Azrad
2020-09-18 10:33 ` Maxime Coquelin
2020-09-18 12:29 ` Maxime Coquelin

DPDK patches and discussions

Archives are clonable:
	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox