Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2091307pxk; Mon, 14 Sep 2020 04:40:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHpNpbpy4YgshSDppBhQ6w8d9a7erBEwpL4HmVnWXUJ0mHP48MudpW6B4J9nMFhlvTPoeQ X-Received: by 2002:a50:fd10:: with SMTP id i16mr17176153eds.54.1600083624951; Mon, 14 Sep 2020 04:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600083624; cv=none; d=google.com; s=arc-20160816; b=rICpGUEOvBbuzL5k8r7Iern6+EMFT9gxb3P8DbVjm6Cg/fPKmbBqoo05B0j8rpqr30 0e2OK61sFGXfKClKdYngLSzvvy22w4VlJmazBOgVZSrqQ3BXOQ2l1QUA2Tj4YS/QTDQQ q8yUHske1h/VQGth1LyOMd/E9nUCheImCozkRZ/aO+1ccrgWa+Wzh8RhjaXSRIsBSGsa eTx+2x+l31/eSxeBLqtUI5KmDUF6i5gpuzIYXH/pQLB36sBnAqFhfV8Z6sYaLTi/qy54 2VC2+qI344La+496F00/pmx5Q0ZhafNwSxJC3CUVnecLqqBRB6Ax9+86nyyw9dPrEZT2 W/9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ueJpq893gUO+axrd/5TX/kkh5xlTqV0vp+NxtBKI8r8=; b=n5GyrjLU0UW9To1uZj0eExakC1Y/nr6544iAUMKAEpEvTnztakkFS6SzfhhKkajrWN ZflzbL7TrydaMMZFDHsZhwtuEYapXKxCF3YIlZ8ebyW7TvsZ4+NhfyU9RjoP6RZzkKBj yrfJ9uEH4FZxAOho8J+f9zyQvCGDB9ZCRPCb/IBYX31Ed9ewOOzwUUp2ejyei4qn2+63 qGXoQFMUDHUaVDhRGemeAgFgq2cDLr39wohWxT+zpnR1oyCG9VMFdS4kf6AsLK8jUswg QXdh3KFd2XlZ/Pwpfezeoo50BzchwUrtaKOpQL6RDNRTLnq7Sc+eZXSgaJDD9ntxNZcd e/hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=vEOkSlbi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh2si7006465ejb.228.2020.09.14.04.40.01; Mon, 14 Sep 2020 04:40:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=vEOkSlbi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726070AbgINLjO (ORCPT + 99 others); Mon, 14 Sep 2020 07:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbgINL2c (ORCPT ); Mon, 14 Sep 2020 07:28:32 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E58C06174A for ; Mon, 14 Sep 2020 04:28:32 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id k14so1276346edo.1 for ; Mon, 14 Sep 2020 04:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ueJpq893gUO+axrd/5TX/kkh5xlTqV0vp+NxtBKI8r8=; b=vEOkSlbiTR0FB7u5nOEqCxgF9Y0JIfTIUnHf+eYnro+P2y7hFd86mdqfPNxSkRIl93 K7lKy2LzTfI9cEUQrobvXAyvWk1R9xdNZOuZ5kwq39uZXSjs+S1xxvAl0LXSMxtcn3YO c6fBfNNbeOxb2SPvsud0lI+3s6LIkSbqnMdmHnIpt4C75aINOJPrtpFF9D9lhQ+KNPpI 8VJEdmYEYvfwYV0zC/CPSHVThI0LHAD1kkBPmuygCWyjc6seLYPGu80m9CWiys3g6eN5 yVMCSIW8L5KlaQPWzMt5kNMJvpxQqi8ogOTQmzl0gS80zHJqH79PeJgzyDjqH90N/OTr de1w== 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:references :mime-version:content-disposition:in-reply-to; bh=ueJpq893gUO+axrd/5TX/kkh5xlTqV0vp+NxtBKI8r8=; b=TI71grHEVR9ahlLjuyXaC3qsoK6H7eZzoPdg8j+ZBn9ahNj/Wk1hqCcuiDrRaC5w84 V08WvBhTddSxK6RHOVULDq8gHW8QbPhrTukNrO9xUEDg0BZwfl3FETQAZ5IdRfB/XVpR C80dRrG3Xcd93MYbdrkTYvgg5UF7d4LLACGFDCKND0o19HIqe5/JfwWGX9Gl2iis3t9F negyh7lxIYpgorewn0STHdFdRoQ17kOLa+nDBUWzYO73yKJtdLcNsx3c2lje4rSkIj2w 3iPy31sSZxVjRsQqea3bfqJ7+5ieKZ8+mNKItI6M2isJCEvyk4e00ccQqZlTPz9wfF17 pqaw== X-Gm-Message-State: AOAM533adwMVm7s6rPD/KI6yzvyIPc0ffSA52aLtiaGDVSficlSk1p7F EQud44GEdc6Ssr6q/wcn/PG2RA== X-Received: by 2002:a05:6402:1151:: with SMTP id g17mr17054933edw.227.1600082911058; Mon, 14 Sep 2020 04:28:31 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id c8sm7500970ejp.30.2020.09.14.04.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 04:28:30 -0700 (PDT) Date: Mon, 14 Sep 2020 13:28:29 +0200 From: Jiri Pirko To: Vasundhara Volam Cc: Moshe Shemesh , "David S. Miller" , Jakub Kicinski , Jiri Pirko , Netdev , open list , Michael Chan Subject: Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command Message-ID: <20200914112829.GC2236@nanopsycho.orion> References: <1600063682-17313-1-git-send-email-moshe@mellanox.com> <1600063682-17313-2-git-send-email-moshe@mellanox.com> <20200914093234.GB2236@nanopsycho.orion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Sep 14, 2020 at 11:54:55AM CEST, vasundhara-v.volam@broadcom.com wrote: >On Mon, Sep 14, 2020 at 3:02 PM Jiri Pirko wrote: >> >> Mon, Sep 14, 2020 at 09:08:58AM CEST, vasundhara-v.volam@broadcom.com wrote: >> >On Mon, Sep 14, 2020 at 11:39 AM Moshe Shemesh wrote: >> >> [...] >> >> >> >> @@ -1126,15 +1126,24 @@ mlxsw_devlink_core_bus_device_reload_down(struct devlink *devlink, >> >> } >> >> >> >> static int >> >> -mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink, >> >> - struct netlink_ext_ack *extack) >> >> +mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink, enum devlink_reload_action action, >> >> + struct netlink_ext_ack *extack, >> >> + unsigned long *actions_performed) >> >Sorry for repeating again, for fw_activate action on our device, all >> >the driver entities undergo reset asynchronously once user initiates >> >"devlink dev reload action fw_activate" and reload_up does not have >> >much to do except reporting actions that will be/being performed. >> > >> >Once reset is complete, the health reporter will be notified using >> >> Hmm, how is the fw reset related to health reporter recovery? Recovery >> happens after some error event. I don't believe it is wise to mix it. >Our device has a fw_reset health reporter, which is updated on reset >events and firmware activation is one among them. All non-fatal >firmware reset events are reported on fw_reset health reporter. Hmm, interesting. In that case, assuming this is fine, should we have some standard in this. I mean, if the driver supports reset, should it also define the "fw_reset" reporter to report such events? Jakub, what is your take here? > >> >> Instead, why don't you block in reload_up() until the reset is complete? > >Though user initiate "devlink dev reload" event on a single interface, >all driver entities undergo reset and all entities recover >independently. I don't think we can block the reload_up() on the >interface(that user initiated the command), until whole reset is >complete. Why not? mlxsw reset takes up to like 10 seconds for example. >> >> >> >devlink_health_reporter_recovery_done(). Returning from reload_up does >> >not guarantee successful activation of firmware. Status of reset will >> >be notified to the health reporter via >> >devlink_health_reporter_state_update(). >> > >> >I am just repeating this, so I want to know if I am on the same page. >> > >> >Thanks. >> >> [...]