From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH v2 net-next 10/10] mlxsw: spectrum: Don't use resource ID of 0 Date: Sun, 1 Apr 2018 09:26:18 -0600 Message-ID: <092640cf-c42b-5e2a-60df-7069361d4405@gmail.com> References: <20180401143459.30770-1-idosch@mellanox.com> <20180401143459.30770-11-idosch@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: davem@davemloft.net, jiri@mellanox.com, petrm@mellanox.com, mlxsw@mellanox.com To: Ido Schimmel , netdev@vger.kernel.org Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:44742 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753615AbeDAP0V (ORCPT ); Sun, 1 Apr 2018 11:26:21 -0400 Received: by mail-pf0-f195.google.com with SMTP id m68so8013704pfm.11 for ; Sun, 01 Apr 2018 08:26:21 -0700 (PDT) In-Reply-To: <20180401143459.30770-11-idosch@mellanox.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 4/1/18 8:34 AM, Ido Schimmel wrote: > From: Petr Machata > > In commit 145307460ba9 ("devlink: Remove top_hierarchy arg to > devlink_resource_register"), the "top_hierarchy" parameter to > devlink_resource_register() was removed in favor of using the parameter > "parent_resource_id" exclusively to determine who the parent is. The > root node's resource ID for this purpose is > DEVLINK_RESOURCE_ID_PARENT_TOP with the value 0. It is therefore > problematic that the resource MLXSW_SP_RESOURCE_KVD has also ID of 0. > > Fix this by numbering driver-specific resources from 1. > > Fixes: 145307460ba9 ("devlink: Remove top_hierarchy arg to devlink_resource_register") > Signed-off-by: Petr Machata > Signed-off-by: Ido Schimmel > --- > drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > not sure how I missed this; I booted the switch with the above patch. Thanks for fixing.