From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30056.outbound.protection.outlook.com [40.107.3.56]) by dpdk.org (Postfix) with ESMTP id 2ADFFCF80 for ; Fri, 17 Mar 2017 18:15:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qBQ84hx3sCr0DIFDqlsPVS2yOWW+OYvQtPAvgDQrwO0=; b=CPs50Jly7GSlgXjBtcxnjiC1Mtme4I150AhzG/x4EcnGjmsPA7i6ewcY+HI+x+3K+Wvbh+lw2wGtWxW5swLGKXHGXaHvXMdAnsmqePtit1/3EuozT4VOK0FC1qYMF/lnBFfQK8v5Zr3DweCXvQyrLIp0pLY5oBOt6Npf75D5HGA= Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=mellanox.com; Received: from mtidpdk.mti.labs.mlnx (12.250.235.110) by DB6PR0501MB2455.eurprd05.prod.outlook.com (10.168.73.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Fri, 17 Mar 2017 17:15:07 +0000 Date: Fri, 17 Mar 2017 10:14:56 -0700 From: Yongseok Koh To: =?iso-8859-1?Q?N=E9lio?= Laranjeiro CC: "ferruh.yigit@intel.com" , "dev@dpdk.org" , Adrien Mazarguil Message-ID: <20170317171456.GF530@mtidpdk.mti.labs.mlnx> References: <20170316224056.19685-1-yskoh@mellanox.com> <20170316224056.19685-4-yskoh@mellanox.com> <20170317091143.GP22756@autoinstall.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170317091143.GP22756@autoinstall.dev.6wind.com> User-Agent: Mutt/1.7.2 (2016-11-26) X-Originating-IP: [12.250.235.110] X-ClientProxiedBy: CY4PR04CA0035.namprd04.prod.outlook.com (10.172.133.21) To DB6PR0501MB2455.eurprd05.prod.outlook.com (10.168.73.136) X-MS-Office365-Filtering-Correlation-Id: e28a0f18-2a9c-4436-e3be-08d46d5929d2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:DB6PR0501MB2455; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 3:XGY0onU+FtNgi3bcZgyuMKssMYPAzNBu4vgrbV1JnnPRJAfz3bF3PxOabd7t7vk1Vq9xBSLVHbou9/Cnw80iQSOAGMNwUwcerwun7/YTqLM5YzikXl/CdzvzoVz49y9V5L0QcaVPzIMNVg/s/uQpyIgxviP/KJAS4dgQcvPyFkQ12ZzaRNBSQe5gC/0QM7k3dM+bqtCfeWBz8L2KdFbaWamXmrRdJAF3heM20283Bz3omNhS5JuV3xC9vTOz471xxgonS6VjRCjPKP2COGe2GVDoQUEh8+msmHEOx1jFMFc=; 25:j8mjl4jnIZt/DcDQOz5eSfjMPAne7+ADtsRTve+Bj2JtCPr3V87wXaY+/E/hJ+YNhqBrJpiTps453YoEBgyfcCVwxT/d9JS9+Ab9biovBlPC1omSL59szhiJi2p3OUTNTeCnyixENs+I9ZO+mRgzSiNNWAJJ+OkaDlQ95i79ryZZngZu8aheuUALz9RM+dB+dm6kB5wYenBFgLBdkJDHgPFSBIsrN+mTrSDy0W6sRc1BcbM5u1nwIKO+fSgiX6ryy2BV5m2kaD5XIAX2Wwe1kn/51iVMXlJ5DUQjkcxfOZh6zub2XwIxQkNqvAEqhucldzAnzDj+wpRtfuBe+TIWlQYi+G67J8ziWH9ZyAOq1wS8I+5wkanFTlX2yOQYOBwAI2rkRQm4RT20gUqC/bJWtcVTn4lXNj/2+GPHcZAypW4LVYxkg0DwjmluLOycU388cojR1RaNFwyIg/hq8ypjwQ== X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 31:l37/KHVlwmrckBp4xZg+YRsJUjhVPsP/Knb2WzIXp4mH34HWAvZkfasxMm8rBIXurffxO4x1CnIeOPh4KeMSvPls5KyuMDyADIaK85tx1dm4grVZvmbusUXOlE0hT2M0yk1Egp14nkGZkcGt215B0grJrA/ZVqT4qRgXveTVPF5UgqDO/JglXKqpXaRjwn2HUHislC4rCNQuLqHi9sPnhONsIiH5jGwumXGNEWQqxaCD+aLY0M4Iu/L4SX67hvPsuhfoMoM6fBBZm6+YwXqTLg==; 20:OfiaVeuH9uX9e/+vrl/alui6k093nJO0pHHX9lkT/qQ/xdpACGgV93Xx3x8bt+6l0f7NxxoIcr5sDN+TworrNBTpLakELCl215Zk5pgfy+HTNyolGT8foqApkB+lZKCVHvj73tvYimepGApGN3atUcfP0jkhBWlH8wdgi0bS7MyHY0Z/Nc9LH+g5bTWI8OIZzABFJGNtDXjtEzrNjZAKf/dk+2usXpfjDCDqfeSCcXoMTukwt+dCoiYec77jv/IvyGNe4xmDWs6RlwC70D+FfHkgAS1HIxIkuKt8onAT1ACLGhVQflAiiZYL/WsK6I6vGBhRNhj1ZDFK2CEmqZascEwPC7PZJjgnXt3IcarQHqhoTyE0e9gTR9p0EsvLbXC78ygDX6HdSsXjOmi16A2vCqc91TJhBixBnzHbQ5CFHg+yTX1GzkipwG78j+LMX7kT7V4vN//8yM9m7JrMBBCXF+Q8xvNQa6tumlCSGPAwe+7AnkIIltdZvoL8LYvyb6+U X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558025)(20161123564025)(20161123555025)(6072148); SRVR:DB6PR0501MB2455; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2455; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 4:Na6mZga/Ko0vSLdpCnWNwEaONakpeaCmnafzjv3OYJm+IWXGCcr8x54g296ZzYsFxTmUeu9JFWyt/zXlWwe2x7FBu7uEe3P+9SYaJqNU/svY6fMNS9Tr9RkhZp3Ml8EUEisAC8bP24D9MNpKfXrvXBKi/1MzF/h9UdzU8roXvHvCJi/Pc8TVU1MM50lXyJj8FjaytmpGzCfJAyXCjWogPS9NQlwXs80sVANn3dPesoKh89hzg0e+1J1IYDHlBbAejK7LoYDAtA96FljGfv6o2ChB/03DJzzu29XgQJtfe2VUJD2PWkiP/hCBq96Nm47jGLvFRHN13EJYbWKNz+7Fb8CS80glQZhy502+hS1g90nfqJtHA8B56ZKKUUZXydn4gbxtZ0BcAmHdiweypZ+LV6i7MIN9hijy6+Y3dug/qmYQhNn+sMnzKZyykfFJbqeZdX+uKeYtQ1HVYrU1mz4mXqrHMpbwsUNE9h97uNkZMb7Zjj222chA4JMyrJLHJkiVRLyZ2mCtJGBZHH8VMeFhEggdoROBMTWFaKR6XjV/oU165ShIjA7TAxxEZF2Jr9bAkGqPHs7NfXVnLPI3YplVMjIzWWmIFsNv8Lt/ToXuulB94RpE/hwhjjSNdtYa7Lqw X-Forefront-PRVS: 0249EFCB0B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39410400002)(39840400002)(39850400002)(24454002)(55016002)(25786008)(189998001)(86362001)(4001350100001)(33656002)(42186005)(6666003)(81166006)(229853002)(6916009)(2950100002)(5660300001)(305945005)(7736002)(2870700001)(2906002)(23756003)(50466002)(47776003)(6506006)(66066001)(1076002)(50986999)(4326008)(53936002)(54356999)(38730400002)(76176999)(8676002)(110136004)(83506001)(9686003)(6246003)(3846002)(54906002)(6116002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2455; H:mtidpdk.mti.labs.mlnx; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diag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LwcUgLkqgcV0fP/Jl8AKCCcQspcAEy1mu3O2AQBf43RFs7V0c8noAGonOlyCygR6XVEKsHBNmTAeSDQ6w4Szb2unbSkb4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 7:8z6qRzvgw62rU40PytHFAuCS/oovwddeWmBA5G7Bz1mJu93e39sLDlDGr/uiArzkNIPhIGm2jH8eUop88lOt2M+eSG2bP1EwPXW9J8xRr7hXg/qf0CHCHAs9VAHbUKUJgyLt7kqtIFeheiN6vPNXRDh88T1Gxfqck+Cu1ag0BCPi/IVdExrocq4akyOD/g5G6gGGC+mCy5fOVzB/tuiXkAcsHRjllDvXUOCtuzqmZDL2zxKIkm2/q5qFikE6bLPHZVsc/2jsAeqVC8juJEmVuTCpNkHMYk1ybwsErcewwLGTqgdO+Sw/UtV7LSScZ8YRCkLv2n61ZJwb+nkedYOcNQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 17:15:07.6817 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2455 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 17:15:10 -0000 Hi Nelio, On Fri, Mar 17, 2017 at 02:11:43AM -0700, Nélio Laranjeiro wrote: > 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. For some reason, in mlx5 PMD code, priv_* calls return positive error numbers and corresponding mlx5_* APIs return negative values by adding (-) sign the the return value from priv_* calls. To follow this tacit rule in the existing code, I casted the return value to unsigned. Thanks, Yongseok