From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C166C43461 for ; Mon, 14 Sep 2020 11:39:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0374721741 for ; Mon, 14 Sep 2020 11:39:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20150623.gappssmtp.com header.i=@resnulli-us.20150623.gappssmtp.com header.b="vEOkSlbi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726113AbgINLjW (ORCPT ); Mon, 14 Sep 2020 07:39:22 -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-Google-Smtp-Source: ABdhPJxxa22k0tyYYsZqkw575AdHLtFmcfXeXtQgasSchDYyiAjATwRvMqf2bds7G+REYxRqdiOb1A== 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. >> >> [...]