Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp156362yba; Thu, 25 Apr 2019 20:17:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1/sldbn9CgBJ+uPfaHx0ybdDJyIpl5lmetienPNsUIOFiZKpeIcnA40rusz1KDXJptPpD X-Received: by 2002:a17:902:324:: with SMTP id 33mr32710381pld.246.1556248633313; Thu, 25 Apr 2019 20:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556248633; cv=none; d=google.com; s=arc-20160816; b=tYbT0EPXd7kBjYY+0Yzc+FNXJ3KahTZwxU9RopfZxTTnOmA0Kz5Zpsfn+za2d4QWee m0bd73szAQ238Zp+eO0j7M5r+wwEfSj934hEox8FaJnWQUt817MElLxr76VkVcv4B9JE Adg5sfQHMN3HinM1wgghFc0kgSVb0yFCU2syatsAWnNmxOv5Fz0FMwomjFUDASQfGaY5 O7EnN5bvmFxaYWYEVRjjHufFKxt7SLMTjDfyU7boPnMPOP50fXg/8Kz4dmoq7+Ur9W2i IVLC+dV8MUeArS51Src1cakPNgkmQWZnbVbu0okY7fvu2l4A20AU2IT2to0o6Y2PIzQ8 2nXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=Dmt86cvAtAKBxNH5qe3yzo7tNTPBM5j4xs//7OU8lNU=; b=MZ/pg0gKuGj4jCw4k6IU/sG2brvMUuu/d/V4kEG1v5cPtrfIZ6pttJGw1eduVcRWdM JC4up+L3X9FVUjUKMhVtZQl23YzHvZcngm+ysbJNWXpvZFxhpE/dbhDtqCqXq8/v+MIH 7oDSNhEA8TPXhzRIQhwnxbUvaZ9EBQfoazHu/EpTKcIP2UVbf+U+xzzuafL7EWj2y4i5 zA5iQLC1K4o+CQUrcfDCYvn+xGyplyrRvICKW1qP3mpZgJNjTgAHdRSm8vfVu82LGqhd z1OzoJQGsAlYXTgo9ItrsqvYXh05r1b0pL+RY9LRuw6MoUE+0sHgFQkLREFw78cMwFvs xsow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=swQlCevC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si24377948plh.186.2019.04.25.20.16.58; Thu, 25 Apr 2019 20:17:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=swQlCevC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729345AbfDZCho (ORCPT + 99 others); Thu, 25 Apr 2019 22:37:44 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:42819 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbfDZChn (ORCPT ); Thu, 25 Apr 2019 22:37:43 -0400 Received: by mail-qt1-f196.google.com with SMTP id p20so2501378qtc.9 for ; Thu, 25 Apr 2019 19:37:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=Dmt86cvAtAKBxNH5qe3yzo7tNTPBM5j4xs//7OU8lNU=; b=swQlCevC/BDwMOtwX1AFdQBwadRT2sG2XrgFaTVYn9D6dWzId9g/6Fcj7xIkx4x4j0 +vB8SGlksa8DtMmKhE+xOJPt5jC6L+UxNIKnw7LyuFLEMDRBAUh6JHQ9N13EkiGEYLmq 5Kga85CShqXbIGV+YkqHDbd/fM2aNXCutXPaGI1nCX3YKzDvu7EJlPC6c63/mmXCd13q LlhPc4DhtoMgcQM2cJH8kGViTKa5UkGqXeTe3U7Qv6cW/5In2G+QP2dZVp7zLWUT5dA4 HQ/vsbhrPFJuTTOWEjQQPPP6bSW4246cGD9riC+pMr/572dMEUsIX0F0t1iIwVnJkvc7 va9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=Dmt86cvAtAKBxNH5qe3yzo7tNTPBM5j4xs//7OU8lNU=; b=GVIIU4gV8Z+CJVFDVTYrINsGFcV+J4+BiypdYfT1uItnFHcqiLbnbVnc8Wl7410LO7 R5/QVL94Rn8/ezYM0avnQrVsoDMiZeLbTVj2WJ4J+e+G98gEv8Au7AjUOrbRQFCYW5yZ C4tbeOngLSUSudDJf+Pp77U/ZBInqww0EtASnd7JCvtVg0/mF3eSzD4vHesBFPtBuqAV 3i8Bh0xLCuO8Y338/61rlPZffcah4JfQUyurmJWzvXe0BjbffQRlE1fjXKDYA+nLAJgi i3iN3dN9ahgez0t7CCwzJN46i7bU1ISSNJFGotWzcddEMC2SdH8e2jMpobZJxCG0N6zH m4Ug== X-Gm-Message-State: APjAAAXQBxppy0Zu9/8uavgIQL9dWlMAXkNDjgC+M5NRRelyZVLEZtme 1Eznxr0pnmnFMR3Zk8xoSw/KJdC03aY= X-Received: by 2002:ac8:2234:: with SMTP id o49mr2911305qto.104.1556246262764; Thu, 25 Apr 2019 19:37:42 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id g17sm192646qki.61.2019.04.25.19.37.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 19:37:42 -0700 (PDT) Date: Thu, 25 Apr 2019 19:37:37 -0700 From: Jakub Kicinski To: Saeed Mahameed Cc: Moshe Shemesh , "davem@davemloft.net" , Jiri Pirko , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next] devlink: Execute devlink health recover as a work Message-ID: <20190425193737.131be39f@cakuba.netronome.com> In-Reply-To: References: <1556189823-5368-1-git-send-email-moshe@mellanox.com> <20190425143847.417033ab@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Apr 2019 01:42:34 +0000, Saeed Mahameed wrote: > > > @@ -4813,7 +4831,11 @@ static int > > > devlink_nl_cmd_health_reporter_recover_doit(struct sk_buff *skb, > > > if (!reporter) > > > return -EINVAL; > > > > > > - return devlink_health_reporter_recover(reporter, NULL); > > > + if (!reporter->ops->recover) > > > + return -EOPNOTSUPP; > > > + > > > + queue_work(devlink->reporters_wq, &reporter->recover_work); > > > + return 0; > > > } > > > > So the recover user space request will no longer return the status, > > and > > it will not actually wait for the recover to happen. Leaving user > > pondering - did the recover run and fail, or did it nor get run > > yet... > > > > wait_for_completion_interruptible_timeout is missing from the design ? Perhaps, but I think its better to avoid the async execution of the recover all together. Perhaps its better to refcount the reporters on the call to recover_doit? Or some such.. :)