From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=J/43tpJT4ZBbU+qgY3DY7ADq33uk3Hb3gO5SwmK1ECo=; b=gC2p34/IgJxb19sjcGK6KKXPDc2b8bamsAmg9rYr0tweR97mD+vSoiLjCBNXQ0C4Mw kNdvn87ZNaoH/MK9CC3WWR34W6lgETD70GaX1j4EPkSc2xsPenEk8WAipfgtG0aZSLqE vK0c76IWvoACGqGdP6zz3F69sn3XHFNFBBGEFV06L++1uOBHnaIgVf9NXR98Z1HXSQFD AFpnBGLZLjHP5UNrpRxTUqyYF/HJRrPwcNSgw41SIRMnsn7QA6uJT/eDstg1i1YEPUSS RiTUWny29szMO/nl8ZtKfaFhMOBs254neN4T+/UGe8453HLjVj7Fw0yq0+UdDvSEn+4r bGEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=J/43tpJT4ZBbU+qgY3DY7ADq33uk3Hb3gO5SwmK1ECo=; b=aPhGzobGC+CklunDB29j972ciSAwn5obz4a+sPKgYbn/TgEwlQ8u0kUTJhYK4Q6Mxc ooXevaaiL3PbraZkZz2OcvgyDYt7C7oCC3zE4vg2f/g/fL4yf/dyKBsdL9KYWRjfx/4t BD1ifsIMSA5cLCBmaqcMCrkqxxZiksRWx3uqv+ZS+1H+yrDu7vrYUxJ2jm54ixXO5W2p g7IdSyCCDLFnupII+7zsRhZojoiIu/y3nu5blAk/7Mk+C/Rcaz7d6uvFC1bt3Ph7NyIx fIiUqTrmHohQ6FokUskyBcJy7i9kLTHGQSVPLTBdfDylwYaMRdBsLj5xjUNQEQpArOq4 WXJQ== X-Gm-Message-State: AFeK/H30yj2c3z2Vb7SDG6A8TLbhqRldB7C7ybLSbFFBbDT5PVVr3zkJpvsbsA343tgVgRNU X-Received: by 10.223.129.230 with SMTP id 93mr11736634wra.41.1489741912539; Fri, 17 Mar 2017 02:11:52 -0700 (PDT) Received: from autoinstall.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s18sm1924306wmb.18.2017.03.17.02.11.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 02:11:52 -0700 (PDT) Date: Fri, 17 Mar 2017 10:11:43 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh Cc: ferruh.yigit@intel.com, dev@dpdk.org, adrien.mazarguil@6wind.com 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170316224056.19685-4-yskoh@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 3/3] net/mlx5: rebuild flows on updating RETA X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2017 09:11:53 -0000 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