From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0069.outbound.protection.outlook.com [104.47.2.69]) by dpdk.org (Postfix) with ESMTP id 3BB3A377A for ; Tue, 21 Mar 2017 00:04:57 +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=xNgERxsvHxaqwwqxjhTr8xMNLn2ngfaY0dsawYp/vD4=; b=RMiB06Z8Lvb/Y6GZc3Y3g5gV3J81TTax85A+tjJms0ZlFZedzePq2aeNHPc733C+EevtHw432fhgx82TRH3FAkMIeDWMAoOvWbhrouwSaApGDd2li7ksMudW4Fbi8nPytsPY31WAbiPi2oFJdhg9qYDJGpBuf8u/HUA6EC0OsNI= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=mellanox.com; Received: from mellanox.com (12.250.235.110) by VI1PR0501MB2462.eurprd05.prod.outlook.com (10.168.136.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Mon, 20 Mar 2017 23:04:53 +0000 From: Yongseok Koh To: , CC: , , , Yongseok Koh Date: Mon, 20 Mar 2017 16:04:35 -0700 Message-ID: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: <20170316224056.19685-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [12.250.235.110] X-ClientProxiedBy: BN6PR1301CA0021.namprd13.prod.outlook.com (10.174.84.162) To VI1PR0501MB2462.eurprd05.prod.outlook.com (10.168.136.13) X-MS-Office365-Filtering-Correlation-Id: 75e8011a-97e7-4a55-0324-08d46fe585a6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:VI1PR0501MB2462; X-Microsoft-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ujFkWoawd9bDkcpbn5UdgdQ6kmTpBpwsX4tevgoYKUfMu9vl9mQxh4pGw=; 20:UalpYVxNzqADd0Enu/N0bZlvkUeID1NcNdWMmLakD5CQ0OqymkzHO3IQan8AinL26gzG9lIYfcV9EyfUQKkter0R7Umlq7NfXMVJVTRxHilWKN8f0cyBqYqH5Tp4b01+GIhBm4O4uhe8eoWtpq5gDpsWoluQ34u2c0h2yoNGy9YmQ5hxQk7Q5nrBJwWxaG1Gab21ejVrcPp4jj+xWKoqnUsfAjjlMSjgPaUQKqRhTRPlLCQWNRrVSC35MYvBSP4a32vFA3IF/rgdIM5lWDXXjmPURvqL9oa/KGhVSRuCduXs4xKWL3wHHXqLtfzWD5WJtIRruI/HYh5u6INhF0N8k/w2yUltroQkRqazZ0bx8JZHyqSoPt0bLhHzDgJXva5szstxwqpkY2gPYJLBr6MkoNRQDkOCDyoaLR95c74dvCi8EsLzOi82E7F75qPBk2MVEBaoCOLL6AUHCkmV/HGco0Ve6LWlvtCulgZ6HZU3IW76uGmsi/UKHTEq1OkOPmBY X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558025)(6072148); SRVR:VI1PR0501MB2462; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2462; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2462; 4:pfsQomJcf4dBVVk3NqJS5S6KLZpD1CV3wu9Ska6QOCexe0MPw9rmDPV2eHKtSdVwLfc65BSoo3XkyMg0UcQ4gG6+8Xk8nyFJuZbZUbI5JyysdLiNdvWpkBhTsmnFLysM8N9IzXWlH1cd8xddVzdrJYadWutLoLgIEuUXKn8GC22DdSrm9d5ySm4S4ysBstyOV+mlLnxwZab2tXhIyqIjZd8omIqgLSn3fY0DK29x5x6B61pDKrwwMat6f4AszyGCv5JGDgsZUVHr+GM5rqAXWTBFvJQtyGLPPlCPWaO+FHpRl4wzsAQ0WW4a76wAdEuWJjwOSoCEUrgsWet3CDP9/yQJbqnAe84jrSOj/81WEdlyYg2XKxlXsbTc1anxDSMZekKPFmVrlSSjRsYS4dv60ZJ/euXKQfofgmzUNl/gVFDxd32LnusI6BpGjU1Qxrz0DNXe5FdNNKqHexytN6rRYcDVSv8Grhx4wQpj5wUA5ts/XqXuYrbUkHjSyhI8wCR1z6ZRjjQjNth6qX7n3LoAKjcslE6nXlR3Kww1pnxO2VJMwjbdRn/FFTvukNMpAyPY+sqg2aqWL1N3MvGq3ZTcwZoPoS4pZioAw9cwTyK4VYIMlhA/SmaIzCY9cQAxkqJa X-Forefront-PRVS: 02524402D6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39860400002)(39410400002)(39850400002)(39450400003)(305945005)(47776003)(33026002)(7736002)(5003940100001)(118296001)(5660300001)(66066001)(86362001)(81166006)(6116002)(2906002)(8676002)(107886003)(4326008)(3846002)(50226002)(38730400002)(53936002)(189998001)(6666003)(2950100002)(36756003)(54906002)(55016002)(48376002)(50466002)(33646002)(50986999)(76176999)(42186005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2462; H:mellanox.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2462; 23:Q4YsFtGersUfLrIFedoWrEz1+Y3K4CmHb9RwdMn?= =?us-ascii?Q?4Zn5JczD9ZpeULFRpJwRtaE3FVNBVR1oXxx7gjkHFCIhdG5B113OAYmMNFqS?= =?us-ascii?Q?pF7kXnWajjX4G8RAV2s8lYP3xgJBMbrhWR2cQm056QdE3sfHPfAKUxUZgFIn?= =?us-ascii?Q?j6E+HZp3bR0Bqkbf0eqPaWrus/jInMLqaIyslle3T3f+q7LZNqemD6y8ZSnU?= =?us-asc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rg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2017 23:04:53.2694 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2462 Subject: [dpdk-dev] [PATCH v2 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: Mon, 20 Mar 2017 23:04:57 -0000 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c index 0702f1a63..a2dd7d17c 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); - return -ret; + if (ret) + return -ret; + return mlx5_dev_start(dev); } -- 2.11.0