Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp796519pxk; Thu, 3 Sep 2020 12:50:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7X/Dxt9uYzStJiuP2HYqxbQl4DOWWM8BLmLkMrmWoeBEcFrhw4avrB/EzYaUjuNMes9Su X-Received: by 2002:a17:906:4a8c:: with SMTP id x12mr3932614eju.271.1599162652594; Thu, 03 Sep 2020 12:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599162652; cv=none; d=google.com; s=arc-20160816; b=SDC7dgnKqmaijyGQY5IgGSD/NYoqdcnp6N3xH6MQCnHZAQ6cSHcCP8h+FFW7W33z/I DwDmxzeezmXZYSabn9HZ8Ut1evtsUzOWa2/6hsJnPFqAwj3Y8FLKso9QL8gpkNVZdq3G PmQ7QD56Z0NnhwR2zthWCV+1Go8LP140nkqFLnaw1Mm4lhccFRmid8Lsl2FpN5WuilAW Gu+k62pJg/IgfS0UjOMaYoJjBZDk2qEMWJuUWlF3xMFgQJc0DoqFAVhwtFVXpaGP32ke PJhwZ+cNurNXgvFFkfxsovjrFKycezJl0lGNsX+u3Q/7EMAr5iYaYeMMlnwRva1L+exL oe+Q== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vG0/XN9Wap3y3BfDL26F/ZHQJiwBq6Xxn5SuG0Ov+fA=; b=RS0Gv4oigaojoyI5cHWn+NxlBUDYr+bGnJbNfW9TS1FHv9KOggNMJ/hvkzTLMxhJmn DHhomjyRMrZJo6casJhLN0HRXpEnAbR8CXrOFhGCmu5t6Iz6dgvhrRFbEcz9R3IzAVAB wcV3n/wscVIz2BhSgjt6XTBQcGSgUb3BTCpfJYr6GKFmfxppbI9VCmDP1sPZPP4SN2Uq bliSND/zaDmgKM017JQ3nsvTqpJo7AWAFReRI8u8tAgskzA3qN5OJjzdh91ExOkOje8N 8XZaa63RHt6iJ8PKhEh85BGm33eUabbmMROoSBYoqPFQ3OqpQlFa8DZTFacAEgu9pVFY 4SoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xIVtI7wI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si2386312edx.5.2020.09.03.12.50.29; Thu, 03 Sep 2020 12:50:52 -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=@kernel.org header.s=default header.b=xIVtI7wI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbgICTrZ (ORCPT + 99 others); Thu, 3 Sep 2020 15:47:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:48718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728304AbgICTrW (ORCPT ); Thu, 3 Sep 2020 15:47:22 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 37B9B20716; Thu, 3 Sep 2020 19:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599162441; bh=SztiM9bLtjK/S3/3zF0JjscGA8TaQ7JRlygw0bg5dWQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xIVtI7wIrf2GwuUc4ZV65x8fMXsPFo++tXgM0y00uN/5zth1jivqHxywy+g60BuIE AJWYzv4XXLMzrl2/ca6h/QL9HTN79KOWByYcEQGTsjuKW5KGpwa61iLxbByLXVdaoH 306m76JXsc0HHS68btrkEsCFe4LbxJR1y1BtdNDU= Date: Thu, 3 Sep 2020 12:47:19 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: Moshe Shemesh , Moshe Shemesh , "David S. Miller" , Jiri Pirko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command Message-ID: <20200903124719.75325f0c@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20200903055729.GB2997@nanopsycho.orion> References: <1598801254-27764-1-git-send-email-moshe@mellanox.com> <1598801254-27764-2-git-send-email-moshe@mellanox.com> <20200831121501.GD3794@nanopsycho.orion> <9fffbe80-9a2a-33de-2e11-24be34648686@nvidia.com> <20200902094627.GB2568@nanopsycho> <20200902083025.43407d8f@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200903055729.GB2997@nanopsycho.orion> 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 Thu, 3 Sep 2020 07:57:29 +0200 Jiri Pirko wrote: > Wed, Sep 02, 2020 at 05:30:25PM CEST, kuba@kernel.org wrote: > >On Wed, 2 Sep 2020 11:46:27 +0200 Jiri Pirko wrote: > >> >? Do we need such change there too or keep it as is, each action by itself > >> >and return what was performed ? > >> > >> Well, I don't know. User asks for X, X should be performed, not Y or Z. > >> So perhaps the return value is not needed. > >> Just driver advertizes it supports X, Y, Z and the users says: > >> 1) do X, driver does X > >> 2) do Y, driver does Y > >> 3) do Z, driver does Z > >> [ > >> I think this kindof circles back to the original proposal... > > > >Why? User does not care if you activate new devlink params when > >activating new firmware. Trust me. So why make the user figure out > >which of all possible reset option they should select? If there is > >a legitimate use case to limit what is reset - it should be handled > >by a separate negative attribute, like --live which says don't reset > >anything. > > I see. Okay. Could you please sum-up the interface as you propose it? What I proposed on v1, pass requested actions as a bitfield, driver may perform more actions, we can return performed actions in the response. Then separate attribute to carry constraints for the request, like --live. I'd think the supported actions in devlink_ops would be fine as a bitfield, too. Combinations are often hard to capture in static data.