From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH 3/3] net/mlx5: rebuild flows on updating RETA Date: Fri, 17 Mar 2017 10:11:43 +0100 Message-ID: <20170317091143.GP22756@autoinstall.dev.6wind.com> References: <20170316224056.19685-1-yskoh@mellanox.com> <20170316224056.19685-4-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com To: Yongseok Koh Return-path: Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by dpdk.org (Postfix) with ESMTP id 0072669D4 for ; Fri, 17 Mar 2017 10:11:52 +0100 (CET) Received: by mail-wr0-f169.google.com with SMTP id l37so47846809wrc.1 for ; Fri, 17 Mar 2017 02:11:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20170316224056.19685-4-yskoh@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > --- > 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