patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Jack Min <jackmin@mellanox.com>, Ori Kam <orika@mellanox.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	Zhike Wang <wangzhike@jd.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: fix multiple flow table hash list
Date: Tue, 17 Dec 2019 12:13:40 +0000	[thread overview]
Message-ID: <DB3PR0502MB3964E0CFB742A69F69800D83C2500@DB3PR0502MB3964.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <748a95b9f9030c78c55ddda4642915283de3f13b.1576487133.git.jackmin@mellanox.com>

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyu Min
> Sent: Monday, December 16, 2019 11:28 AM
> To: Ori Kam <orika@mellanox.com>; Matan Azrad <matan@mellanox.com>;
> Shahaf Shuler <shahafs@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Zhike Wang <wangzhike@jd.com>
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix multiple flow table hash list
> 
> The eth devices which share one ibv device only need one hash list of flow
> table.
> 
> Currently, flow table hash list is created per each eth device whatever
> whether they share one ibv device or not.
> 
> If the devices share one ibv device, the previously created hash list will
> become dangle because the pointer point to (sh->flow_tbls) is overwritten
> by the later created hast list.
> 
> To fix this, just don't create hash list if it is already created.
> 
> Fixes: 54534725d2f3 ("net/mlx5: fix flow table hash list conversion")
> Cc: stable@dpdk.org
> 
> Reported-by: Zhike Wang <wangzhike@jd.com>
> Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index
> d84a6f91b4..50960c91ce 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -868,8 +868,13 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)  {
>  	struct mlx5_ibv_shared *sh = priv->sh;
>  	char s[MLX5_HLIST_NAMESIZE];
> -	int err = mlx5_alloc_table_hash_list(priv);
> +	int err = 0;
> 
> +	if (!sh->flow_tbls)
> +		err = mlx5_alloc_table_hash_list(priv);
> +	else
> +		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created,
> reuse\n",
> +			(void *)sh->flow_tbls);
>  	if (err)
>  		return err;
>  	/* Create tags hash list table. */
> --
> 2.24.0


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2019-12-17 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16  9:27 [dpdk-stable] " Xiaoyu Min
2019-12-17  8:39 ` Matan Azrad
2019-12-17 12:13 ` 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=DB3PR0502MB3964E0CFB742A69F69800D83C2500@DB3PR0502MB3964.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=jackmin@mellanox.com \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.com \
    --cc=wangzhike@jd.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).