diff mbox series

[2/4] vdpa/mlx5: default polling mode delay time to zero

Message ID 1606952203-23310-2-git-send-email-xuemingl@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers show
Series [1/4] vdpa/mlx5: set polling mode default delay to zero | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Xueming(Steven) Li Dec. 2, 2020, 11:36 p.m. UTC
To improve performance and latency, this patch set Rx polling mode
default delay time to zero.

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.h       | 2 +-
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Maxime Coquelin Jan. 6, 2021, 3:31 p.m. UTC | #1
On 12/3/20 12:36 AM, Xueming Li wrote:
> To improve performance and latency, this patch set Rx polling mode

s/set/sets/

I'll fix while applying.

> default delay time to zero.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.h       | 2 +-
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h
> index d039ada65b..08e04a86c4 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa.h
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa.h
> @@ -36,7 +36,7 @@
>  #define VIRTIO_F_RING_PACKED 34
>  #endif
>  
> -#define MLX5_VDPA_DEFAULT_TIMER_DELAY_US 100u
> +#define MLX5_VDPA_DEFAULT_TIMER_DELAY_US 0u
>  #define MLX5_VDPA_DEFAULT_TIMER_STEP_US 1u
>  
>  struct mlx5_vdpa_cq {
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> index 3aeaeb893f..5366937e03 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
> @@ -265,7 +265,8 @@ mlx5_vdpa_timer_sleep(struct mlx5_vdpa_priv *priv, uint32_t max)
>  			break;
>  		}
>  	}
> -	usleep(priv->timer_delay_us);
> +	if (priv->timer_delay_us)
> +		usleep(priv->timer_delay_us);
>  }
>  
>  static void *
> 

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

Thanks,
Maxime
Maxime Coquelin Jan. 8, 2021, 9:13 a.m. UTC | #2
On 12/3/20 12:36 AM, Xueming Li wrote:
> To improve performance and latency, this patch set Rx polling mode
> default delay time to zero.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  drivers/vdpa/mlx5/mlx5_vdpa.h       | 2 +-
>  drivers/vdpa/mlx5/mlx5_vdpa_event.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)


Series applied to dpdk-next-virtio/main.

Thanks,
Maxime
diff mbox series

Patch

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h
index d039ada65b..08e04a86c4 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.h
@@ -36,7 +36,7 @@ 
 #define VIRTIO_F_RING_PACKED 34
 #endif
 
-#define MLX5_VDPA_DEFAULT_TIMER_DELAY_US 100u
+#define MLX5_VDPA_DEFAULT_TIMER_DELAY_US 0u
 #define MLX5_VDPA_DEFAULT_TIMER_STEP_US 1u
 
 struct mlx5_vdpa_cq {
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 3aeaeb893f..5366937e03 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -265,7 +265,8 @@  mlx5_vdpa_timer_sleep(struct mlx5_vdpa_priv *priv, uint32_t max)
 			break;
 		}
 	}
-	usleep(priv->timer_delay_us);
+	if (priv->timer_delay_us)
+		usleep(priv->timer_delay_us);
 }
 
 static void *