From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) by dpdk.org (Postfix) with ESMTP id C56A1152A; Mon, 21 May 2018 21:48:39 +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=YBurd0+7TLa8rIUwCwa8tVpS5/pR18/Ib0MDiLq4FQqK6CPihUi3rW4kvQIPjoiww2K2ZvvuT9RUOTqOTNNn4v40pXN9lUJzApIbMdRgZln1rTmrLakF3sPio/t2CIqtiRC6q5EwTTgzZjS7Ttz8KHw5tu4qQt2qlUPZ4F98nzQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; Received: from mellanox.com (37.142.13.130) by DB6PR0501MB2597.eurprd05.prod.outlook.com (2603:10a6:4:5f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Mon, 21 May 2018 19:48:37 +0000 From: Matan Azrad To: Gaetan Rivet Cc: dev@dpdk.org, Ophir Munk , stable@dpdk.org Date: Mon, 21 May 2018 19:48:04 +0000 Message-Id: <1526932084-1120-2-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.9.5 In-Reply-To: <1526932084-1120-1-git-send-email-matan@mellanox.com> References: <1526583136-21680-1-git-send-email-matan@mellanox.com> <1526932084-1120-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR08CA0154.eurprd08.prod.outlook.com (2603:10a6:800:d5::32) To DB6PR0501MB2597.eurprd05.prod.outlook.com (2603:10a6:4:5f::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2597; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2597; 3:Bn5F6fxHMGxsEOzOZBvuZkzCZDhX4WbMap07fD4C27ZAi75k+4Uh4QcQYNWcKowyH1zei87E+DOKdoz20IQLJJ1eBMg5pd79tgrJr/kJ0eOTcoAM/PNYdSNVXyB3ttpmy097IgLAv7VQqH5hUKlTyG5e3KOsgzRygwZwxzLhd9FUl1bY+vG5F5PNwLNJzYp8fnecxTbIqASZSxHQBQG8PTzLFDkL3IkKhI4RvZBUAnzwdi+b23xeH3v4fnX+eKpm; 25:SxPpl8Vjm/hO3a1BkQWx1PSNsj+4CoJVKyrx1hMgIYaACPJXEouYsAWEtCfeQ77s9nnSEg4aRvlBGTlKosXa5bQkmjLFGTg495xJw0YCMnCre21Q1DJfgipTB04Ro6tyXZMB3vzvCoVziyt/qQYY86jTNMaWitlX5CQ3/xM95S5yjE3TF+jIeBNbUq1woInbDctpI8PHUK8gqGjBLw3/ajnsyqvjQ9VGX9+hngUVF38S3fJAHpIO2KF1FBSBebTyMeJ7ZnC+gBBufhQnrhVh2S2lCXm//HRn53a9U66IU04oJqMUdxTbaBBsdkjN/2/NsE8mP7AsFeVDH4fL36ZfBA==; 31:HIxCD0tt9qT389/gxITCWoL1DRiFQ3xEfRR630EoQpizZBzsfp9/zxhhWXz+9q4bP5MzNzL5eDfS7/QsgsFYgaYpAkj3s5VRBR+S94vdL9sWUivucOrC3UInQHM2wB6CzT01ZN06In81ot26SvblLjKKPNaBZAIm0A2VoHvMEDpWVRl2fJ7appOHSd7D2od80RkPRYDHXG+Ps9PFeBCUL/8VzHC2/vMod6NWrA96K5w= X-MS-TrafficTypeDiagnostic: DB6PR0501MB2597: X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2597; 20:GOB1UIZXqS5J31e35DZUNfgBeLaf5GV8nE7Dxqy91eR7akE6E4LA72BdkO27lIPzRT26ITz7A9EE2u5DURRDckJHY0gH6DvCdTb1SxQc7bqcZXTAkWw3g31DkGNmGYFyYZ0SCrIu/y3tA4OorBbgipOxDsuTW8w0TASAKQX7QCDo9aZ+lBPSzchFDcNXBs6p6wLs/1RCuQ5nSBRuG7xKX3tRVsVPYFHlAOM5KklmZT28hTmupJzUTAZOMyLp9sFmOeo3RW5Kk5lA4SElhz+RzqG/lPyKuVH3SAlRte/X6UxdhapD1LS8glkVl8a+Z8meA4T+qFh77VLCoGtjupmZvqqjBJwsUz2B7QNJNnrU6Xp0IVOSgkFDKUDDgWkhw6ZHiNBkbwN5JdCWLnaHYHLwAkoJaalhyDlj/E+JqipVb9/WrFP/n+Ju5/w+z0Y2MEc57ydeWPcMRGyJdXS9iJ8laNZKrpaKmBN+fJM2SeN2qxiLIPIlF/Bd8ZP6xtreuhJ/; 4:0oPxvi9wHgtGFjdybl4TRtJN4vn1m0jXLa478lGz48M4/6XNboQ1E1bPKS0p7BKxqUXDafFSxgYUi7hJwLShq5TSL1/dcsL6R8ExHuB8P9uqqe+m7/VE/rsxnQuexmUgZKAbwC2t4isVzjL0An6vNqjMXuTfYQZnHJ9fHGXOOl1oOfQsvpbXyPdfyB6CkiXCGCSBDk2dBLMv0IbYl4gcIjwjJM/7Q5J4rcRlY7NgiQNyXxzbhYJa9YFmuUJzp1+8gz/oXkWPerBv4EuV5vx1PA== 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)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB6PR0501MB2597; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2597; X-Forefront-PRVS: 06793E740F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(39380400002)(396003)(366004)(199004)(189003)(6666003)(6916009)(69596002)(478600001)(316002)(68736007)(16586007)(33026002)(55016002)(36756003)(66066001)(47776003)(86362001)(25786009)(2906002)(26005)(186003)(476003)(2616005)(76176011)(5660300001)(52116002)(446003)(486006)(53936002)(386003)(48376002)(50466002)(81156014)(81166006)(7736002)(305945005)(8676002)(4326008)(16526019)(6116002)(3846002)(21086003)(97736004)(50226002)(956004)(11346002)(51416003)(105586002)(106356001)(8936002)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2597; 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; DB6PR0501MB2597; 23:9lv8ywxlixPDdZmRp5mmaVuu0kkdHl4BtySR0z+?= =?us-ascii?Q?9ivdRikVLOfTXmaOpL6tNtP9T1VDyKXxueO5TDctz/h7PEtZwTGJxq8eEW+X?= =?us-ascii?Q?gddWB/YJdj1/a21Du6MXyWd5DG0OVrxkXc/N1BoCoClsIK8UHmKlhEGz+DS3?= =?us-ascii?Q?SaKIu6PO1qW+otcuZZ0iQKKvYbk0A6e4cCQ0pHuOD1V4TETIwyIr3lW+XYYd?= =?us-ascii?Q?+imM2bviiq79UYNlS76qw9hY6N5X2pi3KDUE3R2O/GMP0EsSX4vRuoBuYYkg?= =?us-ascii?Q?I0bKBvaVRhnqzIAnMSdQmBtF4Qh7bvsGmu/flK+mm7Q/pNsuCLKHOXECtYJz?= =?us-ascii?Q?OX+Gi+QubHEgYNfhZEKo3t6kRqLQkQg8fBI0d60U9lYsFpZJDsEKOPJU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message-Info: Z+ryeRMLUX1FwND2tXjYGSkUdDoQSFbb9LJ6pjB9JFkIVoY3llAjzBtHQWxWELcfpIXBL9KKAjNdSVouNcHF/KxwvJ2XmlBbIGydNW1tU5NxLDaVfIzPbD08NaCZt6kG4cKQjg8YEe8VkO2mtEW88VQZNPIURTk4plYoE9MqIyLIj7XaFammJDdQMTGkjyE4 X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2597; 6:08W/5dKdT/qadv1ZNOJ32wUTPRIEhKUiB8AauNu6mZE9cVWe7dgyf9N++FNFPN7eNmI9uMcmLT9CwtM48+8vW3lblrYqG4+uucM1qxfXtmprTN+Mh4NqNAd9jBMh6popWOoQFZS9fBf1MylL2Efjw7ckbElroq2FquiOH2pXpXrSsJuEGUu3N9WQ6VoJXC58c+OfLN43iGhah6EjJegogvh+iSh0H8s9BWFkeCoUbSJLn8Q4YGrYGEHyxshZlV645jR/YzAGCFXkzSUIXSLBL/ZdtaQyX+LdNdEExmdiFiU6AO5bIfbAlGfYbaBYW3sdfXlRH9lX/y2Z34p8Ckk72d0bRLno0Kh+B6Xb+DyZxzaQkSfFw0TQvrT1uO8GgfJ0e8uiuokxe5l1glu52M72WNb1l9sg7b5qKURtSAXQgDj1nvLgFXUwLIkJjufNCUxDaE68acOIMjB5pMYl0h5g2Q==; 5:kO7zIfgkKqgZZG1hNu5SgvpTHVKFDtU+moTUAPr+kSdXEnJV5oQcuh+dMlYfa70DbychF00LUlg2nZPExV2KDtr52aYe0SpEFwa39D6f7ZcGA6dJkg/rHelCJG1S/JrN3I67/i+QDmO7eTlWpThu3jnJLkB8bZxnNjDqHG0bif0=; 24:W3ERw2t5y06j9P2bBdIfSiZJ68x60TXWRQUrphvyCd2JDlr3DscgDAYLw/rVEXQQKl9R5om1ckMpskHJn8a1JoAobO+WiwF9vnRchAlkXK8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2597; 7:CNWqXwhpG8CeA6k0nM+5+G6La2KE46Llwcg9NCptG+r2dFr5EdRVWhwcODahYCP/+RnayfczH0ucITWYpxzvjCQH5ZDsv/D97fuiyNCOg3w/r+HOUAHzqUOrIOvJDDS6bWR62vTKp19dCGqGMvzEezDYkvUhDz7A+C1QEmPhEeteOQ8PiYr2YEoHVH11N/1mjjxeQDdkuiJ10EEvUNTIB6PB33wzvDyJaGWLsHQsmNdipS/mpGAeTOcyD+isU8x2 X-MS-Office365-Filtering-Correlation-Id: f9c9fd48-4aa1-459b-43cb-08d5bf53d8ce X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2018 19:48:37.5411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9c9fd48-4aa1-459b-43cb-08d5bf53d8ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2597 Subject: [dpdk-dev] [PATCH v2 2/2] net/failsafe: fix duplicate event registration 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, 21 May 2018 19:48:40 -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