From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0064.outbound.protection.outlook.com [104.47.1.64]) by dpdk.org (Postfix) with ESMTP id 834501B2E3; Mon, 12 Feb 2018 21:52:03 +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=WhBLybafucAnEMs17bOxeYXAEut8zkE/Fw/EWYIMUpc=; b=aTC73vbZj2192I2XpJgvt0vrahNaSVoL0OOg5ybVsgsOobieRC3nHUAoLrj7Rsm5VLxYlW7dTspY7uNuc2JZgwpzokrVTFM6AmxpTJLdXssE0NCwPd3nDFDpaKjW/p+g4Y3PBQDLTk26GKRDex2dH82KY9tweNW4YLpr2eGCynY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by DB6PR0501MB2664.eurprd05.prod.outlook.com (2603:10a6:4:80::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 20:52:01 +0000 From: Matan Azrad To: Gaetan Rivet Cc: dev@dpdk.org, stable@dpdk.org Date: Mon, 12 Feb 2018 20:51:41 +0000 Message-Id: <1518468702-16719-3-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.9.5 In-Reply-To: <1518468702-16719-1-git-send-email-matan@mellanox.com> References: <1518369872-12324-1-git-send-email-matan@mellanox.com> <1518468702-16719-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1P191CA0004.EURP191.PROD.OUTLOOK.COM (2603:10a6:3:cf::14) To DB6PR0501MB2664.eurprd05.prod.outlook.com (2603:10a6:4:80::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3242764d-d6db-4ffb-9870-08d5725a7790 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DB6PR0501MB2664; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2664; 3:OJOhlnWm4PeMgiueTwEMEIsJXoxqgcFz9lQ+kMy3l7ZnFWsdTfcfmqtbUp/6o9eH2CKv6FHpfoSwON3h3K1vx0/nQ4VQZOn1EVeTNSPsBqYrKssPkSc8/FLO0LX6rkWKIuYT0MN+ndnquLc++WTnXTA6l/tH61dcjrLBuhBpMmGPp5IrFwnHt1OdSRGDMxP5yfxFn1jNJ6L1DAXvbPLudSipzoLSfDwO4b1XrMeTu6zoqX88BykxDlQEnz+6F0h/; 25:r+Bneq+BZi9d9csiPypK3I6rLhnUc56gDPP//HMTX8SEZXECSl1fgpcF8ht4oEj9pMO8Sv232ZQdDqOErjxWgYiWmLIK1DL9u0yfdhhXe3j8n1Z1liaDyPpd/yz5wbMGGthyG7nBiED+KH/fgu194tXQ08ZoSe3l5kHTzzyw63LTFsiXdo1sIiYSrFR4nApNJwFSbhtcQlZfa3xRSKEAjyqAxYl0Tn/VpRXxNMz36T1QRe1+4mqTs6jIq8bn/jTGJKJHG9EkYscuau7gI+CejiPPU6FDO9pfrkhkZaGXztboF5OUsnG2H7vXdvTCy0cEgPqrVcAyjyGuGlXsdP4cIA==; 31:KMleNLR5+uEUbiTzpZ2A/EopF6j2ZBXSjWUZsyd4NolT+VzWlgQQswkFoUkNgY9BDWuxKT4zbzbh4h8Lyzjoz5TIZVhe6K6gBqca5SRHyOzlvTfnW1Gd5bjuag179+64B/raX7xuxFHZkLOUEyAdB8Zfsju1PMkL4UrYH4mqpeKGgCM28KzwTh3a/yEstmGGoIIOipJXZNTSnflly3+zOfFMJvFcuf2cN+cbk+ayvM8= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2664: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2664; 20:R/xK4j3UXpB5vr5wqu8hgv7as9FjzfKwEABy/SOVeU9SJopn/3v4oUZi0seGO0WyJBg6o8d/C62tHAm/8VX2E/+LFsgwAsuhfDioebdVfcqfr4YeTGp17NB9WpRLX8pbUZjbVNmP0oAljpy1UFTzRk0t5XjypoLuh5w1NuW/0mdzbvddSgmbIdkdp3MWydPxJQHLQayV62s3nR3GWONGpwmzBnoa6hFxYDaIdCKKTO+g9s/kvPOdQC/ZAhtY3WAaK1Lv1xvfwJVO6+V7XFHiRSsaFVk+HE4uCguIAbQd62VlovfT4gkFw5Lw9TgR5KAexGGPOn3HZKXozvdaMojKFBtFB2qtImWyzcT2AFRthZUkXzEYByhp6OMU1jgkyGmXIZjYfU1kLbYMFv55LrewSYGzAe2EWhyQRpyV6G7JkKrv5c15v38z+72Rts+rLia8tv/ALt0ovLrWZtOrRzukZ/jgsVhjVobB8+gL1AAa/NUCs4GfRtZbhq/RFwDcO8GK; 4:J1zaBAGWTOJ8/Qt3uywy58TXUmPqhv1FUse9xC6DkVliKXrHLgZ2IG0wnqc3sU3kfPMQlUBxMdMOuHnzLHS9muFsWUlr9ONGo4pM1l38KACgTf8T59fBij5himnSMCv8MEboELDmwQJsKrgYeDlgW7t3PtqxT0zlQ0aVH3z7N4/lEH6wgtV4Xnynu209nZ30kUt0Ryu/6x5IDpcRheOV5c2QEuQNzsSV2ilRGzVKXiqvnsZCugLB3g0qClRDxwsk6e51kuSpT9cPAqE2ePiHSg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231101)(944501161)(6055026)(6041288)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB6PR0501MB2664; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2664; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(396003)(39380400002)(366004)(376002)(189003)(199004)(478600001)(8936002)(6666003)(81166006)(81156014)(50226002)(76176011)(68736007)(6916009)(69596002)(8676002)(2950100002)(305945005)(7736002)(33026002)(316002)(36756003)(21086003)(16586007)(48376002)(105586002)(26005)(55016002)(25786009)(4326008)(186003)(53936002)(97736004)(66066001)(16526019)(106356001)(47776003)(52116002)(51416003)(5660300001)(59450400001)(7696005)(2906002)(386003)(575784001)(86362001)(6116002)(50466002)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2664; 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; DB6PR0501MB2664; 23:pLkkR2iChSjJIvy5pkCDzqJos0jJlkOxMclIpbt?= =?us-ascii?Q?fQdmtBMfiLj2Mm1Ufz2sLlDOUjbVkxO/oa+nwfwMHEyzD6AK2IfkQ2F/cwrR?= =?us-ascii?Q?GKvrcoskTbhOp8mnIZoE/aSNQtC5XC35WuEhMr9NFn8R2ugLrqkm9ybQp0d/?= =?us-ascii?Q?/6N47QSGlf7Dsq9qchP4LGTVmP2WYn1jz7316IWS1HfKi+PoZmDJNCPFnZpJ?= =?us-ascii?Q?2ejeTOW3XItTN4YVy0K86RD19zyZhoB+/MZJCtgfVp0h2LHmbEVZ2HqfaoLN?= =?us-ascii?Q?wFOdjLoKYcT0u3X2tNYp7aAVbZWghohMaJWT5c9xmMj95t7iH/MmpldhHSfK?= =?us-ascii?Q?TO/VZ1gKNtaa8wbz/JOGWHOEd2IcroQ8iTbimIvvJvciA3qQVLs/qqgvF/qt?= =?us-ascii?Q?vJDAXiAo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OJVIq328sJGYyFabVZ1v1tKFZ0+lwro/hAz60e2JT/JlOrzL1SD0cklS+3ftDVQeT2oX5W34gcBCIyhot9ro/gtbfqItIruTVxWvcWQDvAMpKL1s5bMJbQq35n469kWB/F3Mu+dpKXT0Dv/YqMFzWnBwV8x8q7kDOJaqH/Ul0ufsBrbtyFNKQe2KQ+oRSexnWqzC/aL1oyTM9dLPjMfMrSB1ht8Z5i8iv/hBAsymcUGDTIUXCfqaUucGCEGffceyi+gx4foaZ4BmnLB2DKrMRRD6X/5T/sGe3PuiWKBIUkiUdsUHdcgGoYPcF/SsU6/3WZzk=; 5:rktfTji/Xv8jmRtr7rLtu+ybAnE1vsqB2vIBTF3mO0v3VjkvdqmZf7ws/52OKS6/OD36Z1SeH9zHfXySUu2ifE8rJ0XeO+ie2wYe5/ADXEyQrg6wHARjvDvQD+2OrIG9bcipau35j0sXN9JHGyQOcwLzy7FFn2/q8bVzcMrEpnA=; 24:iolVPA41T3tgQzg4CLSa8qQRAI3xTU2SQjYGWC9A8+89APSPlWuzgiFcjyL31BgM1sVGSZcdMyy/1pC0VbsCV8lzwr3d4mgOP/LoP+Atty0=; 7:aZcDrHJ56fyHpGne3KM+YsPEEh93GvZQPG7n923/JuV2PbcNZLQpgmfCa+OJ0o9UcntC8rm2KsCZM8GO6sSD3mQIxU2yQyJx+9X5Qly/mIa4pt5k8jUB8oXASXSHIiUkSdpHQB1fKNRNDDfEV1tyoU+fNcw1WlbgPfXSMSiX+hP5CN9ZI83wWJiELIEOkzyIKF9iuxcXHNf/UJyFNYHn5NVn1l7cIo70c1MlMwKgn8+6ERdknN1/ezOlN4RaJ66i SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 20:52:01.2006 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3242764d-d6db-4ffb-9870-08d5725a7790 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2664 Subject: [dpdk-dev] [PATCH v7 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: Mon, 12 Feb 2018 20:52:03 -0000 The fail-safe PMD uses a per sub-device flag called "remove" to indicate the scope where the sub-device was removed physically and whether its software resources should be released. This flag is set when the fail-safe receives an RMV notification about the physical removal of the sub-device, and should be unset when all the sub-device resources are released. The previous code wrongly unsets the flag in dev_configure(), instead of when the software resources release is completed. Change the remove flag unsetting to take action in the end of the software 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 @@ fs_dev_remove(struct sub_device *sdev) /* 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 @@ fs_dev_configure(struct rte_eth_dev *dev) 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.9.5