net/mlx5: fix default CQE compression config

Message ID 20210204160728.16048-1-akozyrev@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix default CQE compression config |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing warning Testing issues

Commit Message

Alexander Kozyrev Feb. 4, 2021, 4:07 p.m. UTC
  CQE compression must be enabled by default unless the rxq_cqe_comp_en
devarg is set to 0 or FW cannot support CQE compression for some reason.
The latest commit that introduced checks for FW capabilities for new
CQE zipping formats disables the CQE compression unless the devarg is 1.
Revert this logic and enable CQE compression by default again.
Please squash this fix with the original commit.

Fixes: f5ae0d46b9 ("net/mlx5: check FW miniCQE format capabilities")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Slava Ovsiienko Feb. 4, 2021, 4:11 p.m. UTC | #1
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Thursday, February 4, 2021 18:07
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; ferruh.yigit@intel.com; Slava
> Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] net/mlx5: fix default CQE compression config
> 
> CQE compression must be enabled by default unless the rxq_cqe_comp_en
> devarg is set to 0 or FW cannot support CQE compression for some reason.
> The latest commit that introduced checks for FW capabilities for new CQE
> zipping formats disables the CQE compression unless the devarg is 1.
> Revert this logic and enable CQE compression by default again.
> Please squash this fix with the original commit.
> 
> Fixes: f5ae0d46b9 ("net/mlx5: check FW miniCQE format capabilities")
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

> ---
>  drivers/net/mlx5/linux/mlx5_os.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c
> b/drivers/net/mlx5/linux/mlx5_os.c
> index 79a4376f91..2dc079779d 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -867,6 +867,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
>  			mprq_caps.max_single_wqe_log_num_of_strides;
>  	}
>  #endif
> +	/* Rx CQE compression is enabled by default. */
> +	config->cqe_comp = 1;
>  #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
>  	if (dv_attr.comp_mask &
> MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {
>  		tunnel_en = ((dv_attr.tunnel_offloads_caps &
> --
> 2.24.1
  
Raslan Darawsheh Feb. 4, 2021, 4:50 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@nvidia.com>
> Sent: Thursday, February 4, 2021 6:07 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; ferruh.yigit@intel.com; Slava
> Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] net/mlx5: fix default CQE compression config
> 
> CQE compression must be enabled by default unless the rxq_cqe_comp_en
> devarg is set to 0 or FW cannot support CQE compression for some reason.
> The latest commit that introduced checks for FW capabilities for new
> CQE zipping formats disables the CQE compression unless the devarg is 1.
> Revert this logic and enable CQE compression by default again.
> Please squash this fix with the original commit.
> 
> Fixes: f5ae0d46b9 ("net/mlx5: check FW miniCQE format capabilities")
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> ---

Patch applied to next-net-mlx,

Ferruh, 
Can you kindly squash it into next-net since I see you already pulled the original patch that it fixes

Kindest regards,
Raslan Darawsheh
  
Ferruh Yigit Feb. 4, 2021, 5:29 p.m. UTC | #3
On 2/4/2021 4:50 PM, Raslan Darawsheh wrote:
> Hi,
> 
>> -----Original Message-----
>> From: Alexander Kozyrev <akozyrev@nvidia.com>
>> Sent: Thursday, February 4, 2021 6:07 PM
>> To: dev@dpdk.org
>> Cc: Raslan Darawsheh <rasland@nvidia.com>; ferruh.yigit@intel.com; Slava
>> Ovsiienko <viacheslavo@nvidia.com>
>> Subject: [PATCH] net/mlx5: fix default CQE compression config
>>
>> CQE compression must be enabled by default unless the rxq_cqe_comp_en
>> devarg is set to 0 or FW cannot support CQE compression for some reason.
>> The latest commit that introduced checks for FW capabilities for new
>> CQE zipping formats disables the CQE compression unless the devarg is 1.
>> Revert this logic and enable CQE compression by default again.
>> Please squash this fix with the original commit.
>>
>> Fixes: f5ae0d46b9 ("net/mlx5: check FW miniCQE format capabilities")
>>
>> Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
>> ---
> 
> Patch applied to next-net-mlx,
> 
> Ferruh,
> Can you kindly squash it into next-net since I see you already pulled the original patch that it fixes
> 

sure,

Squashed into relevant commit in next-net, thanks.
  

Patch

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 79a4376f91..2dc079779d 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -867,6 +867,8 @@  mlx5_dev_spawn(struct rte_device *dpdk_dev,
 			mprq_caps.max_single_wqe_log_num_of_strides;
 	}
 #endif
+	/* Rx CQE compression is enabled by default. */
+	config->cqe_comp = 1;
 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
 	if (dv_attr.comp_mask & MLX5DV_CONTEXT_MASK_TUNNEL_OFFLOADS) {
 		tunnel_en = ((dv_attr.tunnel_offloads_caps &