DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com
Subject: Re: [dpdk-dev] [PATCH 3/3] net/mlx5: rebuild flows on updating RETA
Date: Fri, 17 Mar 2017 10:11:43 +0100	[thread overview]
Message-ID: <20170317091143.GP22756@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <20170316224056.19685-4-yskoh@mellanox.com>

On Thu, Mar 16, 2017 at 03:40:56PM -0700, Yongseok Koh wrote:
> Currently mlx5_dev_rss_reta_update() just updates tables in the host,
> therefore it isn't immediately effective until restarting the device by
> calling mlx5_dev_stop()/mlx5_dev_start() to update the changes in the
> device side. This patch adds rebuilding the device-specific datastructure
> and applying it to the device right away.
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rss.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
> index 0702f1a63..30e59faa5 100644
> --- a/drivers/net/mlx5/mlx5_rss.c
> +++ b/drivers/net/mlx5/mlx5_rss.c
> @@ -357,8 +357,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
>  	int ret;
>  	struct priv *priv = dev->data->dev_private;
>  
> +	mlx5_dev_stop(dev);
>  	priv_lock(priv);
>  	ret = priv_dev_rss_reta_update(priv, reta_conf, reta_size);
>  	priv_unlock(priv);
> +	if (!ret)
> +		ret = (unsigned int)mlx5_dev_start(dev);
>  	return -ret;
>  }
> -- 
> 2.11.0
> 

Hi Yongseok,

I don't understand why you need the cast for the returned value of
mlx5_dev_start() as it already returns an int and your final variable is
also an int.

Thanks,

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2017-03-17  9:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 22:40 [dpdk-dev] [PATCH 0/3] net/mlx5: fix " Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 1/3] lib/librte_ether: remove requirement of aligned RETA size Yongseok Koh
2017-03-17 17:19   ` Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 2/3] net/mlx5: use correct RETA table size Yongseok Koh
2017-03-16 22:40 ` [dpdk-dev] [PATCH 3/3] net/mlx5: rebuild flows on updating RETA Yongseok Koh
2017-03-17  9:11   ` Nélio Laranjeiro [this message]
2017-03-17 17:14     ` Yongseok Koh
2017-03-20  7:56       ` Nélio Laranjeiro
2017-03-20 23:04 ` [dpdk-dev] [PATCH v2 0/3] net/mlx5: fix " Yongseok Koh
2017-03-20 23:04   ` [dpdk-dev] [PATCH v2 1/3] lib/librte_ether: remove requirement of aligned RETA size Yongseok Koh
2017-03-30  0:37     ` Thomas Monjalon
2017-03-31  7:33       ` Zhang, Helin
2017-04-01  7:28         ` Lu, Wenzhuo
2017-04-03 10:02           ` Ferruh Yigit
2017-03-20 23:04   ` [dpdk-dev] [PATCH v2 2/3] net/mlx5: use correct RETA table size Yongseok Koh
2017-03-20 23:04   ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: rebuild flows on updating RETA Yongseok Koh
2017-03-21  7:45   ` [dpdk-dev] [PATCH v2 0/3] net/mlx5: fix " Nélio Laranjeiro

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=20170317091143.GP22756@autoinstall.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=yskoh@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).