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 7311DC43461 for ; Wed, 16 Sep 2020 00:29:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C42C206DB for ; Wed, 16 Sep 2020 00:29:54 +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="NbFFa/sH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727284AbgIPA3r (ORCPT ); Tue, 15 Sep 2020 20:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgIONr6 (ORCPT ); Tue, 15 Sep 2020 09:47:58 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F11EC061A29 for ; Tue, 15 Sep 2020 06:37:07 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id w2so3421893wmi.1 for ; Tue, 15 Sep 2020 06:37:07 -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=yqLuuHaDPyMZVYvimcEZ7loynWyyZ/gx/ESoc2H8RgI=; b=NbFFa/sH+YSHIMHYgG6y+VP6Rtaq7brZnnEH5p9fkhvhHrS70345ou7fSALoGVmJEb iQR1crdjRF9adAfUXYlZKFmFpZjm/TLUNapOr1q+jc33+3mA78YJimFt/qtHQApbP1PZ 9CAZ24egKoDdBnVZZUhuPJEvgfIiddMReF+1fH0bc7AlJ463gjh2JJRTc83/KpgHbOul X/S5BuThOTrRcMsLAaU9EHU9bRZesA0P1e4zVmVc081PywUpFB64hrQaqBKCWFACJbO+ giZQQ00zWCI2DPoERJCzyZ3YpiEfxgko1GnPxi7xJF7mu+bYmjNK/pBgGAmCwkO+Jq++ uW0w== 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=yqLuuHaDPyMZVYvimcEZ7loynWyyZ/gx/ESoc2H8RgI=; b=U2hU/XsCDdA53AUiAO9CNU1hxSIqwOAsXCQdUPF2WvZ8+NedsTHpn8TUnj+2fRxGJm BgUojXB0L59tVye9EAnz53dXKbUBa7egYtmMnVQqALMpXt3R4jLoKaVZeTYCs4d6giVk ymiFP0hTKkLlOnmtiMT7qL4pMAFAc3DJ0HH31adR5JtXD6H2h3ULQ/RhMIr5D3gpfTAZ 7319lm1sO/3RIFtgXn/SaTFX8ozybvWDjvnc/zI2CnE2/KfXxQMbKs3/ZzP0PY/K8hZA H0OXw+z38LrVdWz/xwu+FegNjVVthlDMN35izVooz+9UyAiLTrKvEQItzQsWb2K4PWJx d6rA== X-Gm-Message-State: AOAM5310EZK5NQS7yEnhJPiZAiitsm025vo6G7bpeh5QCdaK5q0wXra/ c0ekQdEFipHTP+e6DscW/ephfg== X-Google-Smtp-Source: ABdhPJwDuI1DT+CUN2L98nHfTizNA421ofnREorseq+7fgmsW7YGpQnQiJxwQHh+JLrZGtgnQVxmqQ== X-Received: by 2002:a05:600c:4104:: with SMTP id j4mr4669381wmi.36.1600177026314; Tue, 15 Sep 2020 06:37:06 -0700 (PDT) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id d18sm27231619wrm.10.2020.09.15.06.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 06:37:05 -0700 (PDT) Date: Tue, 15 Sep 2020 15:37:05 +0200 From: Jiri Pirko To: Moshe Shemesh Cc: Moshe Shemesh , "David S. Miller" , Jakub Kicinski , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate Message-ID: <20200915133705.GR2236@nanopsycho.orion> References: <1600063682-17313-1-git-send-email-moshe@mellanox.com> <1600063682-17313-11-git-send-email-moshe@mellanox.com> <20200914135442.GJ2236@nanopsycho.orion> <565e63b3-2a01-4eba-42d3-f5abc6794ee8@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565e63b3-2a01-4eba-42d3-f5abc6794ee8@nvidia.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Tue, Sep 15, 2020 at 02:44:02PM CEST, moshe@nvidia.com wrote: > >On 9/14/2020 4:54 PM, Jiri Pirko wrote: >> Mon, Sep 14, 2020 at 08:07:57AM CEST, moshe@mellanox.com wrote: >> >> [..] >> >> > +static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) >> > +{ >> > + struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset; >> > + >> > + /* if this is the driver that initiated the fw reset, devlink completed the reload */ >> > + if (test_bit(MLX5_FW_RESET_FLAGS_PENDING_COMP, &fw_reset->reset_flags)) { >> > + complete(&fw_reset->done); >> > + } else { >> > + mlx5_load_one(dev, false); >> > + devlink_reload_implicit_actions_performed(priv_to_devlink(dev), >> > + DEVLINK_RELOAD_ACTION_LIMIT_LEVEL_NONE, >> > + BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) | >> > + BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE)); >> Hmm, who originated the reset? Devlink_reload of the same devlink >> instance? > > >Not the same devlink instance for sure. I defer it by the flag above >MLX5_FW_RESET_FLAG_PENDING_COMP. If the flag set, I set complete to the >reload_down() waiting for it. Hmm, thinking about the stats, as devlink_reload_implicit_actions_performed() is called only in case another instance does the reload, shouldn't it be a separate set of stats? I think that the user would like to distinguish local and remote reload, don't you think? > > >> [..]