From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 2C1C3A09FF;
	Wed,  6 Jan 2021 16:30:26 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E785F1609AC;
	Wed,  6 Jan 2021 16:30:25 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [63.128.21.124])
 by mails.dpdk.org (Postfix) with ESMTP id 13B0F1609A8
 for <dev@dpdk.org>; Wed,  6 Jan 2021 16:30:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1609947024;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=rGZDR5JcrTSqevxguzcEugEY38KVrNkGmoNer/OK0UM=;
 b=a7ODxpO2W/NFh/Qk0hPILKk10cOxAVJ7moD1xqKRSxwnFtEMXhjdByZy/mauAsAoIfmcOY
 YSZNdhs/fBgX37AyIv0zigzh+pDUFIAtuvpLd+28J2SxTQnAcb1mqypdU4JBzp30oych3f
 m2QZ3dLA7kvR7UdwjGEo8GkzHORG7Es=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-372-8xDZC29FPBmsE_GJmXHsng-1; Wed, 06 Jan 2021 10:30:20 -0500
X-MC-Unique: 8xDZC29FPBmsE_GJmXHsng-1
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
 [10.5.11.13])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4888F8018A4;
 Wed,  6 Jan 2021 15:30:19 +0000 (UTC)
Received: from [10.36.110.9] (unknown [10.36.110.9])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id 9886F608DB;
 Wed,  6 Jan 2021 15:30:17 +0000 (UTC)
To: Xueming Li <xuemingl@nvidia.com>, Matan Azrad <matan@nvidia.com>,
 Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Cc: dev@dpdk.org, Asaf Penso <asafp@nvidia.com>
References: <1606952203-23310-1-git-send-email-xuemingl@nvidia.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <1ef97920-9598-59de-5aa4-2a66992a7a2e@redhat.com>
Date: Wed, 6 Jan 2021 16:30:14 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <1606952203-23310-1-git-send-email-xuemingl@nvidia.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH 1/4] vdpa/mlx5: set polling mode default
 delay to zero
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>



On 12/3/20 12:36 AM, Xueming Li wrote:
> To improve throughput and latency, this patch allows Rx polling timer
> delay to 0us.
> 
> Signed-off-by: Xueming Li <xuemingl@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>  doc/guides/vdpadevs/mlx5.rst  | 3 +--
>  drivers/vdpa/mlx5/mlx5_vdpa.c | 9 +++------
>  2 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/doc/guides/vdpadevs/mlx5.rst b/doc/guides/vdpadevs/mlx5.rst
> index 3a6d88362d..903fdb0e60 100644
> --- a/doc/guides/vdpadevs/mlx5.rst
> +++ b/doc/guides/vdpadevs/mlx5.rst
> @@ -125,8 +125,7 @@ Driver options
>    - 0, A nonzero value to set timer step in micro-seconds. The timer thread
>      dynamic delay change steps according to this value. Default value is 1us.
>  
> -  - 1, A nonzero value to set fixed timer delay in micro-seconds. Default value
> -    is 100us.
> +  - 1, A value to set fixed timer delay in micro-seconds. Default value is 0us.
>  
>  - ``no_traffic_time`` parameter [int]
>  
> diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
> index b64f364eb7..5020a99fae 100644
> --- a/drivers/vdpa/mlx5/mlx5_vdpa.c
> +++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
> @@ -651,12 +651,9 @@ mlx5_vdpa_config_get(struct rte_devargs *devargs, struct mlx5_vdpa_priv *priv)
>  		return;
>  	rte_kvargs_process(kvlist, NULL, mlx5_vdpa_args_check_handler, priv);
>  	rte_kvargs_free(kvlist);
> -	if (!priv->event_us) {
> -		if (priv->event_mode == MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER)
> -			priv->event_us = MLX5_VDPA_DEFAULT_TIMER_STEP_US;
> -		else if (priv->event_mode == MLX5_VDPA_EVENT_MODE_FIXED_TIMER)
> -			priv->event_us = MLX5_VDPA_DEFAULT_TIMER_DELAY_US;
> -	}
> +	if (!priv->event_us &&
> +	    priv->event_mode == MLX5_VDPA_EVENT_MODE_DYNAMIC_TIMER)
> +		priv->event_us = MLX5_VDPA_DEFAULT_TIMER_STEP_US;
>  	DRV_LOG(DEBUG, "event mode is %d.", priv->event_mode);
>  	DRV_LOG(DEBUG, "event_us is %u us.", priv->event_us);
>  	DRV_LOG(DEBUG, "no traffic time is %u s.", priv->no_traffic_time_s);
> 

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

Thanks,
Maxime