From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0050.outbound.protection.outlook.com [104.47.2.50]) by dpdk.org (Postfix) with ESMTP id D63A57FB1; Thu, 17 May 2018 20:52:40 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=3Th5aDVhgGrTbwByn9tHMTEClzLuM0swhje2znu4iKs=; b=l5vOhDFt8saThwhRXiBgNcTxO8H6NfEAr3P9cT+MDvNn/Xu8dbx1Kr/jknuohmMQwpkM0lAlPGG0A/izQsgv8/ArCK84iZdFawygZt4v5s1+v4GZVJ67gKVRR6nRh9TluD8abQErJwwMS/bObB6bERKYzMU//2gs80/WQ3tll7A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM5PR0501MB2593.eurprd05.prod.outlook.com (2603:10a6:203:d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.776.11; Thu, 17 May 2018 18:52:39 +0000 From: Matan Azrad To: Gaetan Rivet Cc: dev@dpdk.org, stable@dpdk.org Date: Thu, 17 May 2018 18:52:16 +0000 Message-Id: <1526583136-21680-2-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.9.5 In-Reply-To: <1526583136-21680-1-git-send-email-matan@mellanox.com> References: <1526583136-21680-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0102CA0019.eurprd01.prod.exchangelabs.com (2603:10a6:802::32) To AM5PR0501MB2593.eurprd05.prod.outlook.com (2603:10a6:203:d::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2593; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2593; 3:Niy3yc7zSeyju8sm6kzsIkPTgY8Vt1wCT0xrOpXAmNl+IwzK4dezQWdthCFrMkjJ4N7ND0NlYtqvwwa1jZoMyBHMF2tZnUiAEUN6iEnEruirr+DfOD3ixz0XUL+v9ox0unOU4kSqg2xiGsqS9EoFl4WI8XaillVlrUtKgmuP2CPCEFeHhfEePep5MK7FpDHnoMATUE1G2B3+bgMarc3iQ2Ygc7tMycJL1xvvTQfPrBemXqvuTgsCvNfxCOoVRB/x; 25:tzoYKqqGdk6WkP7mTF6WKql/Tm20pNNqJ9RQkP8l3+HTl2uhefzvuMxXww8RXBQ+RcG6i56pLR0ZpxoF+9HXLuCnSsZoAMB6O1QirE32IJKWoLC70gtsnN94DlUssNALm1JAeES1YFhfigq2DLa0y+Mxm1yKXWFymBVaODbcQzpEz9ElDdqvdEUUVfw01dk0iFybv3KC2HonNprcPFLDLh4sWX+pBDRHvngQLNxIDGcMEvn6fDGiaeazd9TASnTA1sKq47gPKf2pkVwoWyIXgC9ek89pdbaWsEB3eSTyliAWF0xvTWfqKJoITg4Y0o97JMoDMV4qOT1nLwL/L4mq1g==; 31:CK/ab4RcQhAKIyJDqoK/dma+gmskL7XHxCU80GPeWusIP2ldrCuOk9EuT1eRGCSWUf9OO3C6quGltpC/bxA2dRyJWwLux6crDWACBQj3e0gH2a8OG5CyaMF0a2jBnzEgxcolkkYQA/ndR64STGPyBWjCrStv/Xh5NzV9iwiOEO14C830MY9kp2xvnb7ulNfhVpaI7tKHtJUt1gkcDFpHcbVQJoOTTLHI6jHEjjXJL78= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2593: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2593; 20:Y7AXTiUxnOqvrtegjgE8gAFbVpBVgMTx5pL7LVVqftoP9ab1fYsm0/7p6GZV7Bry5u7G/H6eUK3+IpmUtgkrtQHBZu65HkxNwGWiqxLw6parR4bypGoKxMp1gK7Zxc7bpCet3Z4/KqPq5GY4MuzpoFF4gBJdBdWgzf4vP2D1g9yDbW+09rmgGzcUQcmaxQJTamREfJ5rVaE6bPdxFqXRT1kwuUhT0ID+0pUpLcICoxgDcF/AVkW1/MDPNAOwAEkQVzPeQvH0Irg/YeO8tSWz49deTBPjpPkWRg3q3EOONwvdUaiiLC/oT+vpGTeNORV7/xs2tr38ws0LNdR3ODiktTvc5fVsXgxJS/VY5nrT3ujX4Ee72J49PW8BOd3xioJo4D9zatWSk0D8/SZ/1j0A2eEWNbJElPCc6FR5n09sTmtZoYwJYucoDQPebhN4Gbe8lHGUOREh5imqWwZIfzCmv5FPRDhaB4u+WzE+A8uDskoNgVftrGX9Z8q0S9jTBzpT; 4:G6HLry8LMH1nsqk9VMGfrv2H1iIYyKdGic+fFJ7vwic8YGgqw13iwfJzX9Ut4sZLrStC+kEN7uh2IfzrOjmRf4r6XaBmR8QmiRg6YtZB1/tlHt1y0sh3MV0cWtY5ZcGMBi/Bg4OD0huSssIunTQTGdmGBaPQZlcksYT5/hl8uBeVXU5XwMKhpUrHsdMYMvKbztGTk7/q+AXX2dM+HAmNcXOuV651LtAmRsWrlATr6D+urbccbTgEsgyl57up+QMcJG9nESijdzJN3GLoTMl27Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:AM5PR0501MB2593; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2593; X-Forefront-PRVS: 067553F396 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(366004)(39860400002)(376002)(199004)(189003)(186003)(16526019)(386003)(51416003)(7696005)(76176011)(52116002)(81166006)(6666003)(33026002)(6916009)(26005)(21086003)(305945005)(36756003)(8676002)(81156014)(50466002)(48376002)(486006)(2616005)(7736002)(4326008)(476003)(11346002)(956004)(446003)(53936002)(55016002)(478600001)(47776003)(69596002)(68736007)(316002)(50226002)(86362001)(66066001)(106356001)(8936002)(105586002)(6116002)(3846002)(2906002)(97736004)(25786009)(16586007)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2593; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0501MB2593; 23:73EzUR8F90zY/mBjivQH81XJdfc8IYJTgGKX1JP?= =?us-ascii?Q?PIqK+t4d62wu1SFzYH+hLIQqeZqKRbfdoOCLFZnkgDUsyv4WYgXJE6rxi9jl?= =?us-ascii?Q?l2ILlttiAXfxDUVcP4BoVHaZ+qNX5b/JW169uVuYROtA+64FmR4mVPydftoT?= =?us-ascii?Q?3p0a6P+/TJF7AT/jqRYrrE1e801nJv+3RN0Gh2oao24oO0pnjRXqQc0cJA+P?= =?us-ascii?Q?FcEfMI+E/ECUNDterHLD488hodM+nXZUkGGZAtgBMVo0i1RRKFjBGOuS9ctD?= =?us-ascii?Q?UU9qKslXsbULW3VQxcZ7W1oU8fAFVMj6uf6PvzgLGPbptN8meYNVGM8FmGHl?= =?us-ascii?Q?9Dn16w+/Fbxy/p1w8aDGaMOQMayuVycaxmr0b5f0SPHK2CzCcfxgSx8JuzYs?= =?us-ascii?Q?uWajHdXihpZloPVVlBf8XeJb4ILeimE7DW/LeY5T32Jz2FY3WTqGDYdUiez1?= =?us-ascii?Q?hJjsG1DC7Pcgf06T/U+MtwfjozPLfc8Ecw/rN+vUKH1VnLW06D24qu6S/bQf?= =?us-ascii?Q?OaCE2E6CGVij/6u1vvbNZmVdeZz8UB3KQ+3PNe8xG9KHHAqfaqm3mYmAq8DJ?= =?us-ascii?Q?UPoZ5xL8lTOQ1Fa4htBM7tPewQ7YtpAkpne9yh3rQiJLMKvm5LjtbIgNJQJH?= =?us-ascii?Q?wP/fam25HXu3ihytXzS/L3SKcG12DbM4gJ/uy4sxJ4mq2LQpzrUS3s8VNNAg?= =?us-ascii?Q?WthU2faHltrMM+QtiMxrGZuYurBQikzIGKw0Daiq6xJt4+8x4he7stLfjg3R?= =?us-ascii?Q?TV9hTerskGroaaYvVd3ugIo0VpnCZX6aQEQqW/l2vhbBuJs8oD8YaSP1kv1m?= =?us-ascii?Q?3VLtMx65L1dkMuC6Q3+jIP90O0nPGemg0caxOzpxMWjwKC/HIyXcsn55487S?= =?us-ascii?Q?LuFl48rVrw65+LcRozsisCrelZADAxS+e9dEHgt23IZINE/Z/4J8yRB517s0?= =?us-ascii?Q?24K3yhLV90kfmky6Zq9pZ6HElN6yMgsX+PNSp8mBPosMSTlTXoEt80XzZY/m?= =?us-ascii?Q?j6MExWKwvUWwYnDpVoOZEVR4vbkJ5G8+7s6X6InILe7qBWB/0huDKVmufiCk?= =?us-ascii?Q?+26m08Wl3kOH/TG80e/sUC/QmneN3ILjmO+t3dzW0OpqOjBcL1M5LrIexb1a?= =?us-ascii?Q?aLkCoOsDdK09H1Ooz+bJ5tFKCp9EwnJxYaWLmNGJHqE17U4q149XHmrBsM5F?= =?us-ascii?Q?0RwxwnWu102flAiJb34kIKCqKjd7meI4gmtVboJvy7glKwLHN8agH2HX8fA?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Antispam-Message-Info: rxnwqEg3ENn1/6XLhOmNwCLyubU55oBrnXLbWJGtMSkTPrBvDGEnwkIP77EViyIHXqKACw68GV5Sh0B9eCioHofWWopACdiliH777RiWPnF8jzhf2be1/zyvdkQmClTFkqcayEQV14LJrDgi6CPuLLdeBEcGvJKYcgUSVBC48X6WtgvtNAbYKLIyzejSUKMb X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2593; 6:Biw+T2leJml4P6yc4zxVLb5a8ApfALAsowIgtR3CFR3YwaJqDBbdnBelzIAuisZYvrDT//EjIMwCrOFDLDz0reNz8uNTCmr9E05bVMNABLqArZ/RsIQGXs44BKK5Zk7LZSjT+iiiI/0cEx0lmQxSG6m94WtYgKmEPG2zt1bK0YWvOXr+4VbpAvq/sNGzvhM+sVPjG2z3JLC+mXw/r10babSSSvU0ZUxJBkipcXz13GI64BZN+qGwQJQ/K3SAq11PbIZV+ItIOcIdROL9A1vnMNZJYnCBtKxd9nVQnLtT5skaSY7uL5czPLh+MFFmMneFJSFSvAbW4rMjhfnnCq6R3lVfixSBM839YWfk2HCgflfwEX6DKYjyg3/4T+5gsfHwdL1zXL3DHWXdq0OGr/119q6SY34ks+n1aQP4D/Davvnqen+rvzvW4li/2A70y4tni1yPjZ2YDOC7/A1PyAmuRg==; 5:db3JDJkRO1Hpz6b/neZ0B3lG17xcyW9DVSR/kwavAJ6+1TomcSRcSdt9QPoT91ReEG/OMsmx8PiMpijVCdZwHTLCUP30YpZTnGeSTscCUGJ9SZ9D8ZfwSq3JexFRukmHsPDKPirbXEsrWkAKPqAhKVSyY19qYKMaFflczKGEDaM=; 24:NT/LRnwCXNr/JfhLsgVwH1MdRnmfMkXATsoMOP9KglJy2eykOY77IQc0zgxCPmC0P/wSoBanyv2pCjYtbCisT/5Z7EDmM2i29FiH27RtNOk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2593; 7:7rUu7ZVtO3bsO/eabzJRkt5eihXRMc5bs7a6fS2IZsMcC/9KmsWHaTDhrVwJfpY/d7+9RMu/0kdqfzYlyhtqJEE5a8vEgZSpZzfTs5LEaWtt51yWl+Ckhru9gRis1RskUSNOCvZWYYFuxlCtOGqX3yDq3ryepreAiXRk1wAYPgk+kvd63Q1u8P7EWYfy+VqAM0iCMJL9uyKtE5Q/Cm8stsURWw8b2EFD3gMbkt6yHelBZvrCp9qKmC/ZjEhqiyWo X-MS-Office365-Filtering-Correlation-Id: 7b5784d0-08b9-49f7-4979-08d5bc275d4b X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2018 18:52:39.1279 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b5784d0-08b9-49f7-4979-08d5bc275d4b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2593 Subject: [dpdk-stable] [PATCH 2/2] net/failsafe: fix duplicate event registraton X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 18:52:41 -0000 When the fail-safe device is reconfigured, it attempts to register again for the sub-devices LSC and RMV events. Prevent an event registration if it is already done. Fixes: 598fb8aec6f6 ("net/failsafe: support device removal") Cc: stable@dpdk.org Signed-off-by: Matan Azrad --- drivers/net/failsafe/failsafe_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index e0570b6..24e91c9 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -138,7 +138,7 @@ fs_unlock(dev, 0); return ret; } - if (rmv_interrupt) { + if (rmv_interrupt && sdev->rmv_callback == 0) { ret = rte_eth_dev_callback_register(PORT_ID(sdev), RTE_ETH_EVENT_INTR_RMV, failsafe_eth_rmv_event_callback, @@ -150,7 +150,7 @@ sdev->rmv_callback = 1; } dev->data->dev_conf.intr_conf.rmv = 0; - if (lsc_interrupt) { + if (lsc_interrupt && sdev->lsc_callback == 0) { ret = rte_eth_dev_callback_register(PORT_ID(sdev), RTE_ETH_EVENT_INTR_LSC, failsafe_eth_lsc_event_callback, -- 1.9.5