From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0055.outbound.protection.outlook.com [104.47.2.55]) by dpdk.org (Postfix) with ESMTP id A6EA51B33E; Sun, 11 Feb 2018 18:24:59 +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=+YdR8/pYwwTU4diJ7MP1QRRMxd6bFaRRckqdEvaI8Sc=; b=WCbrj9yhm718WiahkPQ72Di5S1uGXNf7v1QMh8L/YbU+JHWzw9zLQF37cmZPVSVtetzFTfkdUeaBMhHIIJYDfk7CtXoUwHRVN4LLroJHyzNoGXjFOYE4llnshaDvpgt44gZofMIAzV4j40lVgFcodJIKrQitFYsuLR88g2hgQnE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM4PR0501MB2657.eurprd05.prod.outlook.com (2603:10a6:200:59::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Sun, 11 Feb 2018 17:24:57 +0000 From: Matan Azrad To: Gaetan Rivet Cc: dev@dpdk.org, stable@dpdk.org Date: Sun, 11 Feb 2018 17:24:31 +0000 Message-Id: <1518369872-12324-3-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518369872-12324-1-git-send-email-matan@mellanox.com> References: <1518107653-15466-1-git-send-email-matan@mellanox.com> <1518369872-12324-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0501CA0022.eurprd05.prod.outlook.com (2603:10a6:800:92::32) To AM4PR0501MB2657.eurprd05.prod.outlook.com (2603:10a6:200:59::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3f6e8f2b-ce99-42d8-4d33-08d571745f9b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:AM4PR0501MB2657; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2657; 3:TxPybAqf5ZCzs8DRsBMz9mTOmbGFlwXx3Gd0OOQnSrLvbUPjajU3kng3D11pMvj+6LLUcTUnquyzUrhWk+vE6uAKB7e8vGXzngR0Z1mRiCtP6/WG5oo4kU+GKzNjbFzyh+EoIKhSV5WxMh4aohWpVBHFsgIdxMLo2Ikm25TPeYLbMSjpRSmR+3Pp8SVU3Q3hCQ1vp63GD6zpVp+LeCbOG2Bvvu9Xgam5gUlLIMzDhNzc6f8cer/UL6KImJqtHrfV; 25:Tx8bGbo5B2Gg4aE9NlPPfntCPbIxr1dLnKndA1HNQBUS7vVoGcosPNa/Uv/eTa/jlPsJCKADAkezsMIYaFv2naMyWna29JB/4/VQENTs+ePWakyAApYjEpoTsIrZRJUqu3vU/2j3QnAobu/BYjAdrWcKkBbCMFujKWHqxH5kAUlRBoj+NmWBnal01GN5Cde9Noxzj3P+3OLBJDo5gj13qdWXLQ7Y3bmicxX4RCZASwf/Gtnl5Nc9/X0mqSpce7EmXd2RSRC7LkoZeNSwKl/iG+VpIOFS2d+pj2dl8gIE5+H5BCF+kr080eGjWCP+RUmq9c5FL4Nc6ti5egayfFiDyw==; 31:beTnK+Q00jNMfJuzx+OcRj+YaNao8FGSzXqmqnxBfqywAP5n5/S3OjnJ7ORm0owmceF7W4QczPqsspB1odyzk2OwhQ+jXxc6T68+QCmUlR8QBLFkntVnMZOYmR+OlBsgNTTZI9wfzeWR3L849Qvf+Vv6YUm85Tw4mxwAa1yJJpefifzpw71KzArnbCs7KySGEkLE0q+JtRhCgRkasVN1JHX8pyTAQMhzAqMBu9UkmLQ= X-MS-TrafficTypeDiagnostic: AM4PR0501MB2657: X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2657; 20:ZDSEH3GVoyO6OCaRCy5a23cuksIeIK+RAow09Q+q67SHJ1OE0pzMU85h0Epsp7l0297hmx+pLyn8/8KfBI300Z6diFVLcZY5nVFHsauws+eOaV8tPOmnt4RmWPcVqQyrsCSpnRKd7cK0wSxyb9f11WxyWMcu6MZvTg05XKZetn3OsOHxudpZbz9miGWeqa+5aFDkC+oTvg1JiEtPTJuukVFmhjJ3Kai7gYweES6cWpvyacbbI9CLqmjoh04Xfw6pkyOaFAbJg56AwvyU1CIiPT1E4YAED9wX1MpGE2+WL9oqi03pS6eRyI/YSCkdWcGP6M2XDjq8tdB/vOPkt0zXOS11UNLg51F6IuxcAQpsFqqBn4ehGn0eXUcUPLA6kGaldUr0uM4ma6ioifv+WDWsrN23Jb6VTV6ltuKfniCK3VPXHJmHf4sTXgYSSxgRC5Hk3Ai9wFULTMcvRDjKZscgqPYObQlLlkNexFcadrWpCs4GIYMqy+pXK6/McBURnvw+; 4:2ICpL/46LzE+E0/duAWTKnrbhvIqhkWqBwUAEi1ruiit1VAcP7cluuVIAzy3LqODDRyM4oWlNXyzrVvkiHs6QkhDkeQC0LTEUjh3H+jMJRq23JYG/kmWHC3lSGzDNDGEUI4x5Ygk5ZcpTpx+C28Zv6hRnliRagCk6nu6IAgCWAIS15HuoLdNNTlOfvV3TknyRIB3vnsAYxQNgmST2u7UlyAJ3Hrz9T5IBNY9SMGBMJcjNTo8ieKMgcUBXMyNB03r3NFC5cwow0dFEW+Kc1pK7w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231101)(2400082)(944501161)(3002001)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:AM4PR0501MB2657; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2657; X-Forefront-PRVS: 058043A388 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(396003)(346002)(376002)(39380400002)(39860400002)(366004)(189003)(199004)(50466002)(5660300001)(16526019)(81156014)(8676002)(4326008)(16586007)(186003)(69596002)(81166006)(26005)(76176011)(33026002)(48376002)(105586002)(53936002)(21086003)(386003)(25786009)(2906002)(4720700003)(6666003)(97736004)(106356001)(68736007)(51416003)(6116002)(316002)(2950100002)(478600001)(305945005)(55016002)(47776003)(36756003)(7736002)(86362001)(575784001)(52116002)(8936002)(50226002)(7696005)(66066001)(59450400001)(6916009)(3846002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0501MB2657; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR0501MB2657; 23:Utemj2ZLhDlfhg6scouTYLcrsrMVVUW7FtRy0QS?= =?us-ascii?Q?ORVl5jd2XHZ9RdpUKu8T1yvsrK98M4nkPHsxD4taVrs/2viShNR2iCHJIUSt?= =?us-ascii?Q?+s/Gd7tCmJY5QYoAcnxs1VqtxXZ6SxEHM4O2s5XdLTpprL81lA432Cm/Bp8N?= =?us-ascii?Q?1hXO6ooQgSuKRnQkIsdaQnAPGaoU8iK0kT2YK8iqut4ebDAScuuDywfiFvhs?= =?us-ascii?Q?P7lkh+xWTRb9kw9C/+6tWZppLiFy4BETmH5bbg4tpqfRCDM6mfoAIUOU2Bru?= =?us-ascii?Q?b+MoQE2Rg+++EQSa8fv/NPFZj5/XCtnbYaO5+m8dA6H4fYcK2qpHXHrS6Wiu?= =?us-ascii?Q?NTsA1u5cXBl/FBUyGuTYy1cEBcVmq0Cj6iT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osticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2018 17:24:57.0232 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f6e8f2b-ce99-42d8-4d33-08d571745f9b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2657 Subject: [dpdk-dev] [PATCH v6 2/3] net/failsafe: fix removal scope 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: Sun, 11 Feb 2018 17:25:00 -0000 Fail-safe PMD uses per sub-device flag called "remove" to indicate the scope where the sub-device was removed physically and its SW resources should be released. This flag is set when fail-safe gets RMV notification about the physical removal of the sub-device and should be unset when all the sub-device resources is released. The previous code wrongly unsets the flag in dev_configure() instead of where all the SW resources release is completed. Change the remove flag unsetting to be in the end of SW resources release. Fixes: a46f8d5 ("net/failsafe: add fail-safe PMD") Cc: stable@dpdk.org Signed-off-by: Matan Azrad --- drivers/net/failsafe/failsafe_ether.c | 1 + drivers/net/failsafe/failsafe_ops.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c index 4c6e938..d820faf 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -280,6 +280,7 @@ /* the end */ break; } + sdev->remove = 0; failsafe_hotplug_alarm_install(sdev->fs_dev); } diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 7a67e16..f0e48c1 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -131,7 +131,6 @@ dev->data->dev_conf.intr_conf.lsc = 0; } DEBUG("Configuring sub-device %d", i); - sdev->remove = 0; ret = rte_eth_dev_configure(PORT_ID(sdev), dev->data->nb_rx_queues, dev->data->nb_tx_queues, -- 1.8.3.1