Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1423523ybg; Wed, 29 Jul 2020 13:57:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB8pjoEYvmOusQEZMoc7uEq7hlybBFBSjE/JJ4HwOdf7Z88OtfnLkdY+yZlpw2bLBRYC7e X-Received: by 2002:a17:906:f290:: with SMTP id gu16mr199742ejb.502.1596056276391; Wed, 29 Jul 2020 13:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596056276; cv=none; d=google.com; s=arc-20160816; b=avlXSdVZ37ez8VKhlAYZ0KgkEmNnCXtNNeENzi12/GdR1wQtxkBpby8yiRdOizrgyC LUNuIp688roH5fX6sK/8bTpjyPavzgFGe4yg7BTatHVAJF0YHKm/itLjpwwxaV+cGmWe Hu+E8SKhJrShzFmf98KwDIJYeJF17Q7g6fS672B60yv8c47XDlbo+GQ5uZu5ujLZ+qt5 SLUTI+K8kZ0XM2LsbFBOo5NcFD6wJgpRZf0jwnQ41b4KpjDpfnjNLUgBAgK8h6U2llpm XWqhFYB38b8pDAJY1KLmrShE/g5/D4PNj4h0syWaXKXbOmM7Xy7iDXfGQDx29UmvKAvt q6Aw== 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=YzLkp8l2Gysl6njzvJnV3MQZKhdy7JJjEbkZz+Pkbkg=; b=j1fAqR0r0KSQPxwIgd+VVzn/1EYws76enthIG/TdfWOhXRUtq4PEF/4qEkrZfgrvV7 JLmuctQjGSD2QEyWWwvaIAeXcHpKZ8r1KdoK82oyfdlRijU6W+wAoYwwm6t1Fyiuk+Ng /19yowqmem5lRLGNBTLWb3BJS3b6IU1FB4HwZGWCstjRtyTNPiZFVs4IBd2+Y//gemta HXTldr4YfzrSYfO2yHZFYS3MWgA8QUz7s8AUNxsYoWOu/EP0J6X6nVn3zqlGPuq8z3Vf M31roU4cmGlmsA9M8A8ijPme6VjeZXEi7ZXq1Bu3ZAV7Er5Fm0oSRWlK4kfemgfTH2hL JpGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fRKYBmIX; 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 z7si1762243ejj.711.2020.07.29.13.57.34; Wed, 29 Jul 2020 13:57:56 -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=fRKYBmIX; 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 S1726988AbgG2U5K (ORCPT + 99 others); Wed, 29 Jul 2020 16:57:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:34922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbgG2U5K (ORCPT ); Wed, 29 Jul 2020 16:57:10 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.1]) (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 2E3852074B; Wed, 29 Jul 2020 20:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596056229; bh=us69NBFeFCvCXZFBU2qcw5Cmbco3nD42iGG/gPhfYJg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fRKYBmIXhYRcCs7Z8k4qgx2Qr879o1vXtYdDcOLrLzLmrmOs8VBHF6IpPoQ8lt5Q3 WuPg5+pl741bKVGgyeJJNkG3gfYLoT68JilULQWwAKZMw/XkeTKp4n4AIg6lMp/qTC 4qV9aIeKE+PYUvAmPIXobkOlEKLW4YG+q/DB98cg= Date: Wed, 29 Jul 2020 13:57:07 -0700 From: Jakub Kicinski To: Moshe Shemesh Cc: "David S. Miller" , Jiri Pirko , Vasundhara Volam , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next RFC 09/13] devlink: Add enable_remote_dev_reset generic parameter Message-ID: <20200729135707.5fc65fc8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <5baf2825-a550-f68f-f76e-3a8688aa6ae6@mellanox.com> References: <1595847753-2234-1-git-send-email-moshe@mellanox.com> <1595847753-2234-10-git-send-email-moshe@mellanox.com> <20200727175935.0785102a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <5baf2825-a550-f68f-f76e-3a8688aa6ae6@mellanox.com> 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 Wed, 29 Jul 2020 17:42:12 +0300 Moshe Shemesh wrote: > On 7/28/2020 3:59 AM, Jakub Kicinski wrote: > > On Mon, 27 Jul 2020 14:02:29 +0300 Moshe Shemesh wrote: > >> The enable_remote_dev_reset devlink param flags that the host admin > >> allows device resets that can be initiated by other hosts. This > >> parameter is useful for setups where a device is shared by different > >> hosts, such as multi-host setup. Once the user set this parameter to > >> false, the driver should NACK any attempt to reset the device while the > >> driver is loaded. > >> > >> Signed-off-by: Moshe Shemesh > > There needs to be a devlink event generated when reset is triggered > > (remotely or not). > > > > You're also missing failure reasons. Users need to know if the reset > > request was clearly nacked by some host, not supported, etc. vs > > unexpected failure. > > I will fix and send extack message to the user accordingly. I'd suggest the reason codes to be somewhat standard. The groups I can think of: - timeout - device did not respond to the reset request - device reject - FW or else has nacked the activation req - host incapable - one of the participating hosts (in MH) is not capable of handling live activation - host denied - one of the participating hosts has NACKed - host timeout - one of the p. hosts did not ack or done the procedure in time (e.g. has not toggled the link) - failed reset - the activation itself had failed - failed reinit - one of p. hosts was not able to cleanly come back up