From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0043.outbound.protection.outlook.com [104.47.1.43]) by dpdk.org (Postfix) with ESMTP id BDB611B016 for ; Wed, 14 Feb 2018 15:47:43 +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=HxrcJR0yfSIVSelxqCWot/MJnldyluaxWrr6hxYn/B8=; b=a1GwPBG5/TjLwCQEgpjWLLEeWE/HuPMa3t3vUZpkKoTYhS6sdxpt90H3vebiN7Q0d3B0gWCmMklRlrXJprCHEge1OUBBCFA4dLV7biqT/duYYKVTr4/TCyBJdZpw9D+5vkJyfjupZZL8gl8ovFZNRinC9HgmuIW7Wo4lj/LjAro= 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.506.18; Wed, 14 Feb 2018 14:47:41 +0000 From: Matan Azrad To: Gaetan Rivet Cc: dev@dpdk.org Date: Wed, 14 Feb 2018 14:47:26 +0000 Message-Id: <1518619646-23990-1-git-send-email-matan@mellanox.com> X-Mailer: git-send-email 1.9.5 In-Reply-To: <1518562772-29823-1-git-send-email-matan@mellanox.com> References: <1518562772-29823-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: DB6PR0402CA0016.eurprd04.prod.outlook.com (2603:10a6:4:91::26) 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: 8e129f61-0859-4a9e-1c54-08d573b9e6e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM4PR0501MB2657; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2657; 3:9yACl3cYkFle/orCfVTma4gmX15Ir4NNDyIX85BNVL9nNoQ3xEF9oCapR4pR/l7l5aJS1Tx0EiO2KMrvMrUhYalcAAzxR770Q68gcZnqhmA8EsiqIsE2s/W4F9LmwCa9uJxfBgw60i43x4EqXdiPWDH9dFJU7cSWDBuUuAp0QpxaCpHHvXqJxrONwIZW1Kc+V+BdpTEStCEzQ+9t65AU036OsIAFnDfom0rQmT3uNFNcjvj2saqn/JeGSz5PqKzF; 25:BWYDMo4tbJ8B9KbLAJOoqZzTKUFRp/IXRxPni/tNdSf/v5/VuG8b8DgV5AK7g3lW+BQ31bgoI+9TJSTtUs4fhtDSjRt/dzk756BtdrNLY1ChlDbZZ0G12z8drgqbgmNq6Z8f+GQhI2iYHAUwyZzOacLXI8KXVSPIwTcaDkVM5WpTrISG8t1Phj5t5bd86ziSnpMEHOvRZXgMknx+IyiUeomT65dGDQCYbsT55n/aEqp8a15WzgKvVhUtnp4ILC+zFGxGVfRyFVAgRjVFeYP3yRd7XrwjCQQimoSt19JIEtqT6RWJgr8ay4yl4OQGPx7skN8Myn2oChGkpWejophV1A==; 31:L8hsetMIUjoLS7WS8YcHIKumcUDDQlBx752kQV1Kq9CLPLsAk/mQA0jf07lle6fI9kZ2rGa7tqq0aJu2UEzQe+OLhCbAfdIoC5oi1aw/UKB7QxQYns3sN/X1O7ONxMKZXTc9I5DEGGeCz5hsaeTdUoVBHp5XaTiPF6YU2X9r1TouhhBJe3OCizp62W6xDw8M+68Ugnj+9zxy/7AXbmsEvtO+zibw69Z3ulUQKLrLhBw= X-MS-TrafficTypeDiagnostic: AM4PR0501MB2657: X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2657; 20:e21k3KJRc/JQ/tY1FbEH93cr9L6pqGsJ3rPly1Ev1HqIMgLG9+MJ03TdkgpDfVhOoeA2iS6BsAnT+9sR/SXkrpnqfs9MVo+91A8lJakpMmWEGW6GmvJnPVtm0ywFwFuHDEjSB7VZU+pPGu22ZKcp1qEODQ+hGLCvZ40rjSh+boIKTossWlQ/xjn6ADZzdXf9LOjRjY9q6tO5jUOmI8oj8xwMtvbCa7zOloNgxyg+2XTBUZd13lJWzQj+avE+4HwocUk7026zSmH1u/mXrpPNKneMWVilm9iOgctpvfYrl3+ZU+yQm935RVC1i3kA7P7bGzAZp/uikDwSNc+ZSNRzzlLIy0Jd/hEB5NinIoKPSPUwGJ+Du/TFNAnel9mHNaW64ebxhinNNBzYEBs3qoQ4SqEhHrDOZwfBZmaoC0gNLgxd9a1t6JgbS9RhkpSP1c4dGujsV5GnpGbEoY4m2Az/KiOG/G7kCAA9lhbB4A+Dh8Ht59X6bFBtwuunpAhMNabP; 4:PSzMB1+kL/74tPf8ud5y1JekRM2OtOEHKyg7quJOU1XNpChaT+8TAO//XrHsIbsAq64ml8wa/3MnEBQ/SQC6Xf+STrHRgGB7rraFCx25ofNdNMl98HqpUZfbEgDyVfrWPubhXr4BdY39V+OwZByudYZ1trndJ/K+NiHvF/7U2YiF4+v570D0x5zvXcEFR3U02gojsOIeo6zkc6dbyzgmAB/AkvkVbH8riHohSn6husgv+gSpCi1Fs9x5IA1apwEIAffJcC3t7+y4L3/UmAxAbw== 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)(10201501046)(3002001)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:AM4PR0501MB2657; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0501MB2657; X-Forefront-PRVS: 0583A86C08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(39860400002)(376002)(396003)(346002)(189003)(199004)(53936002)(7696005)(36756003)(305945005)(76176011)(21086003)(7736002)(97736004)(55016002)(478600001)(33026002)(16586007)(2906002)(186003)(16526019)(26005)(59450400001)(2950100002)(6916009)(6666003)(386003)(81166006)(81156014)(50466002)(105586002)(48376002)(8936002)(25786009)(8676002)(4326008)(316002)(106356001)(3846002)(6116002)(86362001)(52116002)(66066001)(69596002)(68736007)(5660300001)(51416003)(47776003)(50226002); 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:qIYqZ5mNnaJGYvbf1lH+PpRYDn9xZnNol5Cs5bs?= =?us-ascii?Q?0/HOG5dmE+cKFtzY1r1dyXpjrCIlvBJYtIdVvxq5WYuKbt+qVrRHyNhOYQYy?= =?us-ascii?Q?yyILlhjgwkLUcqRUW+i8Hzm0LNLXMwS4dPqngz4dVrL4u2kjd4s3XdlI919u?= =?us-ascii?Q?c7b061TeYhQYnzT6ba59LL0SBiy7jwLo+KIkAsA/jh9ieeRQjRnLMBCfZXjJ?= =?us-ascii?Q?+FJWZVolRPYFIds47DSe2eMKtPIOD2p2zagtMJ6bFF03IgK1GtefbRc9Y4VK?= =?us-ascii?Q?5wvJ83BpKpfF4L2xS3hN5blQDHzfjzvtj5ZsQAX6Mq3hZAJ2zCtVODTBwVVW?= =?us-ascii?Q?LNKOYRgMUqZ8uLpeBwO3fwhd4Bu+L75sjG5DcF5ZQe0IWjehdS+TpuTUQg9A?= =?us-ascii?Q?skS+CJ+ZMQAAiFBHI5FONVKISIPxCjlZGMmKaQGTHbdkvHwT7yFdj6xev0CQ?= =?us-ascii?Q?Bc/tc6xllMxuNBSBeJUEnKK3hELVp0V0kps28d7xNtw6exmvUB97SU6GQvg1?= =?us-ascii?Q?CatKqAx3lRwgk/NP33QG3KV2PT2EJWlmsAuTXgvdACvdc6ttVae5YWoQhvVO?= =?us-ascii?Q?s3SXIR5Bks9S1Ng5dfld803Ztd02sHS4Ra5aCdUIcVl8Ky1oC0d+ZwpUUJPf?= =?us-ascii?Q?AjI+cOv0i/+qoafQTVjp0g11nN/KuJgnP8TQyRIqZhdDcBKTXsUoBJpqm8qQ?= =?us-ascii?Q?AySu5SkCxpOnuNDKCrF9bTqxk79381IGdWuyiBA7c1JBXNO9M9ZFzw72oiwh?= =?us-ascii?Q?vzFFvYZT1BkmLFWvNxHJHuvfW6fxUKOXFTiyvu4OJfYaMRZXneg/gpUk+lf4?= =?us-ascii?Q?MptCSfomDlFxC6r5M+85046mGYGHJdNIKsj22Yf9PPcS48uA33ZoymDfzQCr?= =?us-ascii?Q?e2nzmUXgC5bGryyhMQOqessjOSQS/pVspgEbsj3v7Hm9Dmn//U/HsLqOf6Vc?= =?us-ascii?Q?ac1Jdg9l7Vl9dk8YoaMLhNtB1RJhHyd5sSMtixRkM3UFrK2/yt7pJVAe64vH?= =?us-ascii?Q?c+BYRX01y7EhP3ROAV5jX/lvSJeh92TgJgFVMpS/Qzm+EBzzgRiftQvhEdqi?= =?us-ascii?Q?Ue7YVdaSB/z+oAYVbNBbMwJ4gipT8qXmB/yATNE//8lk/FMNb26v/sxPRlul?= =?us-ascii?Q?ykQt8LWTcknxIvVh6KxuVpEaCYW0/oNqJT+GpTykUDr/0MVk99L+0AWRnT5W?= =?us-ascii?Q?O05vewaELX+csax4=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR0501MB2657; 6:Vz39U9k/Dfztui58ey1lE2IvJvE/ILy9DqpgrdJ9u00WKChcegXNFrbKD/lEVZeUxDje9m6hHisnET6kixdF/QqwwdFwIwwV7jItrmxzmiPY07aSWYCX+co9bJv9DXJf0l8+CDJy0QatNvpyqDOstLIxpRlpO0t46uD3fnbrLX/VcxFR545tpyi9DcyRTIfDAkZGG1thW6LERgJWemmUrzq8lejEjJokQp32QTN+H8AjqlNyZWyW+Lo1ZySkUjD8wq1h12IoNV3WEiiWLSdoO9ru7H2/ji1LLqMzLkZ7EB5Y4H38HabWPr0l7obcUj3h5/rGraNUoxWVj128z8zWKJZWnc1SFVkD27OhtSZyWks=; 5:w4as8HHGQUygk3JiLvbzAed2/D0CZl1gJFe8z/jTKHsFONVfa5VdCS8Q3GhHgRONl/FoSdngvDR2O+gt/Nn+y8iSle2wXGJNlrZyoNvLnNA7vodop4Dq357J2VvDANLxtu+LILhsQ87SXa3wNvy+APapPVGq3UtX/FrM16j0xy8=; 24:qTmk9b5xFmLnKyNyG3gDEm7Q28uHHLMpJd1uWHNq5FbemQIA7knRgEu+vTdD2wGkE4C4STA5ZV8+3STmve0dnifS/ekRKZUUMmDzd6ZSkoA=; 7:Mg4ibBfxyFk3wEIKlk0AbOjilfOfyieDOitvrgVHBMs+x0cxjSZa+ZMJsd68tIIh0iXt2diM97GcZulQbzaq8OlWecSpp0wqqDAsuvt6HJcyRFoqLwkfcpkU3SiO0ZNbUJzrLQZ+eBY6kI1zdS1qK6ssEndZwbslb88j87TueQ05re3T0fPmviwLZnXfmRSPeX3ClEGKGREh5wI+unplTIWBesc9vjH72vCK1DtSB4dAG9G5ByFkLf8CFE1Ecc9F SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2018 14:47:41.6930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e129f61-0859-4a9e-1c54-08d573b9e6e5 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 v2] net/failsafe: fix Rx interrupt reinstallation 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: Wed, 14 Feb 2018 14:47:43 -0000 Fail-safe dev_start() operation can be called by both the application and the hot-plug alarm mechanism. The installation of Rx interrupt are triggered from dev_start() in any time it is called while actually the Rx interrupt should be installed only by the application calls. So, each plug-in event causes reinstallation which causes memory leak and spoils the fail-safe Rx interrupt mechanism. Trigger the Rx interrupt installation only when it does not exist. Fixes: 9e0360aebf23 ("net/failsafe: register as Rx interrupt mode") Signed-off-by: Matan Azrad --- drivers/net/failsafe/failsafe_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/failsafe/failsafe_intr.c b/drivers/net/failsafe/failsafe_intr.c index f6ff04d..6b7f9c1 100644 --- a/drivers/net/failsafe/failsafe_intr.c +++ b/drivers/net/failsafe/failsafe_intr.c @@ -523,7 +523,7 @@ void failsafe_rx_intr_uninstall_subdevice(struct sub_device *sdev) const struct rte_intr_conf *const intr_conf = &priv->dev->data->dev_conf.intr_conf; - if (intr_conf->rxq == 0) + if (intr_conf->rxq == 0 || dev->intr_handle != NULL) return 0; if (fs_rx_intr_vec_install(priv) < 0) return -rte_errno; -- 1.9.5