From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 06ABAA0096 for ; Sun, 2 Jun 2019 09:53:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDE392C01; Sun, 2 Jun 2019 09:53:54 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60085.outbound.protection.outlook.com [40.107.6.85]) by dpdk.org (Postfix) with ESMTP id F13DD2BE9 for ; Sun, 2 Jun 2019 09:53:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5mWydIsaOflEzx4i3ZQBtLJAPMueGWr1HfAHjMZzbaM=; b=CT8oX+g7JLTwNsfhOmJFDnQRpbHYvWUZGMdWIJumuEMMpQgSJuitwq5rlR/lJettmWb4ClVKH5+qAwVNJTog7QPWkd6Hk6GLfhSmlyh5HbIJG5RG0zEtnVpP0Wuc1dp2TEMX2tiqfejq+FkrqgyM0lG3C+zPOZECaAw9HWppPgc= Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com (52.133.45.150) by AM0PR0502MB3603.eurprd05.prod.outlook.com (52.133.49.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Sun, 2 Jun 2019 07:53:51 +0000 Received: from AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::20f4:3214:12c9:100c]) by AM0PR0502MB3795.eurprd05.prod.outlook.com ([fe80::20f4:3214:12c9:100c%7]) with mapi id 15.20.1943.018; Sun, 2 Jun 2019 07:53:51 +0000 From: Shahaf Shuler To: Slava Ovsiienko , "dev@dpdk.org" CC: Yongseok Koh Thread-Topic: [dpdk-dev] [PATCH v2] net/mlx5: fix event handler uninstall Thread-Index: AQHVFEjcxdBWesSbxUSd6hSLSQFoTqaIBW3Q Date: Sun, 2 Jun 2019 07:53:51 +0000 Message-ID: References: <1558776365-28511-1-git-send-email-viacheslavo@mellanox.com> <1558933112-16444-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1558933112-16444-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7b3196e3-364d-447b-f93d-08d6e72f7445 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR0502MB3603; x-ms-traffictypediagnostic: AM0PR0502MB3603: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-forefront-prvs: 005671E15D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39860400002)(136003)(396003)(199004)(189003)(71200400001)(71190400001)(229853002)(33656002)(186003)(7736002)(107886003)(4326008)(52536014)(4744005)(2906002)(102836004)(476003)(86362001)(26005)(6116002)(478600001)(14444005)(74316002)(3846002)(2501003)(76176011)(256004)(5660300002)(66066001)(66476007)(66556008)(64756008)(66446008)(99286004)(81156014)(53936002)(55016002)(9686003)(486006)(81166006)(8676002)(316002)(6506007)(66946007)(68736007)(446003)(6246003)(8936002)(11346002)(25786009)(305945005)(6436002)(110136005)(14454004)(76116006)(73956011)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3603; H:AM0PR0502MB3795.eurprd05.prod.outlook.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XOeYw2eeALvvOFkpCvZS4GEXpAuMMCo8qW8n60FAornj3iDMy57/mnhqLVbWG0XDzBgRzYbukMfVxkXFIktxGkP8acmFO8eexFRjdMNOI9P66udHL/YxYN5yqKvlKgj2W7+t4WWFLUfSsRuclDTU5IkXIVsKAQKeBkpYGo2/YXM6cTHSnE/r4yt7uLY5mLIBd1lx07Foysi8N7cuLFc0qDWFF7NdXg1ZOER09etydsLiEl8/qfRoRis/E6729s4xpNM8DlVrx7Q11s4Z6N24QG3HepcR4BQh5llAThewCcSDBFMwhtA8l2PUqdsSI1z44odeBm7SxxIVBrO2pQkqIPaUStiwIQth7COsxftM1n5vXR5OvUFBTcZbovA+Q7uiBR2or2ltZf/89FwDNCHStKNUPcixBEhU9JYNOBMPD0s= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b3196e3-364d-447b-f93d-08d6e72f7445 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2019 07:53:51.8116 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: shahafs@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3603 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix event handler uninstall 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Monday, May 27, 2019 7:59 AM, Viacheslav Ovsiienko: > Subject: [dpdk-dev] [PATCH v2] net/mlx5: fix event handler uninstall >=20 > When device is being closed and tries to unregister interrupt callback, t= here is > a chance the handler is still active (called in context of eal_intr_threa= d_main > thread). If so the rte_intr_callback_unregister returns -EAGAIN and keeps > the handler registered, causing crash when underlaying resourse is gone > away. >=20 > This race condition may happen if event handling in application takes a l= ong > time. We should check the return code of unregistering routine and try ag= ain > to unregister the handler. The diagnostic messages are shown once a > second, while trying to unregister. >=20 > Fixes: 028b2a28c3cb ("net/mlx5: update event handler for multiport IB > devices") >=20 > Signed-off-by: Viacheslav Ovsiienko > Acked-by: Yongseok Koh Applied to next-net-mlx, thanks.=20