DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Slava Ovsiienko <viacheslavo@mellanox.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@mellanox.com>, Ori Kam <orika@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix environment variable recovery
Date: Thu, 14 Nov 2019 08:22:09 +0000	[thread overview]
Message-ID: <DB3PR0502MB3964630EDEF119E2C95785BCC2710@DB3PR0502MB3964.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1573662290-23034-1-git-send-email-viacheslavo@mellanox.com>

Hi,
> -----Original Message-----
> From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Sent: Wednesday, November 13, 2019 6:25 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>
> Subject: [PATCH] net/mlx5: fix environment variable recovery
> 
> The state of environment variable MLX5_BF_SHUT_UP was not
> recovered correctly if there was no tx_db_nc devarg specified.
> 
> Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 6ffe951..bafc84c 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -448,12 +448,9 @@ struct mlx5_flow_id_pool *
>  }
> 
>  static void
> -mlx5_restore_doorbell_mapping_env(const struct mlx5_dev_config
> *config,
> -				  int value)
> +mlx5_restore_doorbell_mapping_env(int value)
>  {
>  	assert(rte_eal_process_type() == RTE_PROC_PRIMARY);
> -	if (config->dbnc == MLX5_ARG_UNSET)
> -		return;
>  	/* Restore the original environment variable state. */
>  	if (value == MLX5_ARG_UNSET)
>  		unsetenv(MLX5_SHUT_UP_BF);
> @@ -530,7 +527,7 @@ struct mlx5_flow_id_pool *
>  		sh->devx = 1;
>  		DRV_LOG(DEBUG, "DevX is supported");
>  		/* The device is created, no need for environment. */
> -		mlx5_restore_doorbell_mapping_env(config, dbmap_env);
> +		mlx5_restore_doorbell_mapping_env(dbmap_env);
>  	} else {
>  		/* The environment variable is still configured. */
>  		sh->ctx = mlx5_glue->open_device(spawn->ibv_dev);
> @@ -539,10 +536,9 @@ struct mlx5_flow_id_pool *
>  		 * The environment variable is not needed anymore,
>  		 * all device creation attempts are completed.
>  		 */
> -		mlx5_restore_doorbell_mapping_env(config, dbmap_env);
> -		if (!sh->ctx) {
> +		mlx5_restore_doorbell_mapping_env(dbmap_env);
> +		if (!sh->ctx)
>  			goto error;
> -		}
>  		DRV_LOG(DEBUG, "DevX is NOT supported");
>  	}
>  	err = mlx5_glue->query_device_ex(sh->ctx, NULL, &sh-
> >device_attr);
> --
> 1.8.3.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


      reply	other threads:[~2019-11-14  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 16:24 Viacheslav Ovsiienko
2019-11-14  8:22 ` Raslan Darawsheh [this message]

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=DB3PR0502MB3964630EDEF119E2C95785BCC2710@DB3PR0502MB3964.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=viacheslavo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).