Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2974741pxk; Tue, 15 Sep 2020 07:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNjTOdYTS5VIkvJioJf2YJRcbko/KSqMGhu/4kt8ZNfIf4Tujuncxtec9gOOZFcg/Y2WG1 X-Received: by 2002:a17:907:3301:: with SMTP id ym1mr21390761ejb.367.1600179077621; Tue, 15 Sep 2020 07:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600179077; cv=none; d=google.com; s=arc-20160816; b=diWFJTAWsGXXboR0Elg/lq34yClSA8xOBsOUhAKC3oBM2BfEMoMFK8f6dxqd98TB1Z mq6u4DmCHC1vY4kKy6JEJ2iNnQUsSrsuEkXIlfYIjWyS2ZoP04pdHUr0brmwVxc5Jy90 56jflQT8rMRP483/Stz9cJbtQS9zk/9kdvsNCSYRlxesm9he4YHn96lg12QJhuJXPacw +jJu3Z4Qh7w2N7ur2sTV9aAG2UDbt6FAEuZb83dAxj+NYyhs/VccAcVx6KltSS5MW3Cy SLdqws/c5dsKTU5smY5YN/xvNei0RvFuQ4xVBFZWLiVRC7rwQz6QskPXiXQFalo1r8BV SPiw== 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=yqLuuHaDPyMZVYvimcEZ7loynWyyZ/gx/ESoc2H8RgI=; b=DZvXeMUy3EQW0weXNu76ontA4gKRUSGV+0VC4pRHarS/OxYuw5MW4Ib6UmK8g6Kbk+ H2S+1bIHymlv27gGbUcxltN+jBlJwEVn318bGlGqAqztT9lwCGnm/dRfa69yBN2gOBMb yZ324Cx2br7UShxKFeO+f767jIqKZ6HXCQhC4OqnWSyPi/LXk0XDntbbJDEKVN9Xc8mP w3PJW4qN0tw+jS0iijXi1PuDNf5teplRO7ZmaFWIqlpFq3cS0No0YDx3RLbFGvq+t64x KpiJHU2JYfbodUtKahKlFnLwgRU1U2cvTFRWSJ7/O/ikEj/9EcMYzeP2JWsSbsIPhlNM uSPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b="NbFFa/sH"; 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 b23si9334800eje.20.2020.09.15.07.10.54; Tue, 15 Sep 2020 07:11:17 -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="NbFFa/sH"; 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 S1726776AbgIOOHS (ORCPT + 99 others); Tue, 15 Sep 2020 10:07:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726701AbgIONti (ORCPT ); Tue, 15 Sep 2020 09:49:38 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2153C061A2A for ; Tue, 15 Sep 2020 06:37:07 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id k18so3481853wmj.5 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=jcqpzDrCaB2IZg9dt2aqzEeGYSxXhILDSM+WuUOO0QixFhmVLfZywpDMMvL9a8E4oZ mwL3h+cvTFKA6R/JFLusOOMU7OolMWsjNz5d9zAzyr0oh8FOsZgnNa5SCmyeeIGVV4+i T9jx3hJUve5/qY3758fjlyf2ygD+KimPotZwnc355Y2hHpspyOUBm0KZzCGCU00o9SjR 0uJP++dfYFJtM2tZjRBacbXpkg0hRTeLbURsTkUQ/IXBpDcnuL4c8fzN+GELo9FyAlZD cAadmL1S7C1JCGiOZfR1TkB0HMXdk6ApjV+4Fe/V5Iw58H+/kTErexodIzne0p4WgyS9 8ENA== X-Gm-Message-State: AOAM530zO9g9oMjrdvSj6SJ86jM9GKkzvDBnY8PzJ1b0fy3IUAgXJ+L2 kUFQS1Xj7eocVCC+0R1kiHcYFQ== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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? > > >> [..]