From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 222D6197A9B for ; Thu, 5 Sep 2024 15:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725548704; cv=none; b=RFfe7CUPXoIPnQ2/QfuskOHe651oQ6SYdzvY/cVSSe+FzTG4YW4P+F8GVUV+heal9b36rFtM9CMKMb+2MWOZuioQ6Wn2sqfJjWzykt/j4rB0VGRwF/zm5RHkJ9MHwwM9z1/6hkpQowzYUo/67koq94QdWXlzyNhuzLeHeFqOTcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725548704; c=relaxed/simple; bh=Ld8KTi3QDI3VDWXO6dPONOX6HZLHeHYM7DMRcCRDWfQ=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i9e/Yxu0b2dOv4WwRQr9PTqCyBpaVLJIUnNEXlESTVYKPJ6Oedt9oF9i8448UAuLIo+y4CMWFb6HCUs3jAHKpP6HGI4qmBWAN4y2dQqZM7A+m8YlGQIn9apmumVmaEGq8z35RaBRbLmBeYg3w+IkvKZGUbtO1l276WgLeyQ3hak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bxbGl6Yi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bxbGl6Yi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B540C4CEC3; Thu, 5 Sep 2024 15:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725548703; bh=Ld8KTi3QDI3VDWXO6dPONOX6HZLHeHYM7DMRcCRDWfQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bxbGl6YiK5528f0iedkMc3CPab1WUFRuvkqkHVX96+Zgh5LxTYJAeda1dHTja1IYX Gm/euAa4fXmj0fJLGdu/e4Qt/L+MuVqG8q5yXMs5ohEpu+P039EeXwrrluWiIuZPqW Fn9SmZdx3Q0NJMkAPlsLr0PfgmN11LYsJK4RdptjDIVssru1zNI8lXDM+YliuVmcYt lM4tLHEWDzKbK+N7YX+WO/pMLPUCZhDKOjGYr64YyiCTM7gj6M86e6AnSPHDS4vks+ DAw6Hu8sO9SQW5XhlmiYqK4RrtEXgdl7PD9md7Zu1yVhODbJcD6UDzIdxaYUQI6Bh/ DHXIehKSrOgVQ== Date: Thu, 5 Sep 2024 08:05:02 -0700 From: Jakub Kicinski To: Paolo Abeni Cc: netdev@vger.kernel.org, Jiri Pirko , Madhu Chittim , Sridhar Samudrala , Simon Horman , John Fastabend , Sunil Kovvuri Goutham , Jamal Hadi Salim , Donald Hunter , anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, intel-wired-lan@lists.osuosl.org, edumazet@google.com Subject: Re: [PATCH v6 net-next 02/15] netlink: spec: add shaper YAML spec Message-ID: <20240905080502.3246e040@kernel.org> In-Reply-To: References: <20240904180330.522b07c5@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 5 Sep 2024 16:51:00 +0200 Paolo Abeni wrote: > On 9/5/24 03:03, Jakub Kicinski wrote: > > On Wed, 4 Sep 2024 15:53:34 +0200 Paolo Abeni wrote: > >> + - > >> + name: node > >> + type: nest > >> + nested-attributes: node-info > >> + doc: | > >> + Describes the node shaper for a @group operation. > >> + Differently from @leaves and @shaper allow specifying > >> + the shaper parent handle, too. > > > > Parent handle is inside node scope? Why are leaves outside and parent > > inside? Both should be at the same scope, preferably main scope. > > The group() op receives as arguments, in the main scope: > > ifindex > node > leaves > > 'parent' is a nested attribute for 'node', exactly as 'handle'. We need > to specify both to identify the 'node' itself (via the 'handle') and to > specify where in the hierarchy the 'node' will be located (via the > 'parent'). Do I read correctly that you would prefer: > > ifindex > node_handle > node_parent > leaves I don't see example uses in the cover letter or the test so there's a good chance I'm missing something, but... why node_parent? The only thing you need to know about the parent is its handle, so just "parent", right? Also why node_handle? Just "handle", and other attrs of the node can live in the main scope. Unless you have a strong reason to do this to simplify the code - "from netlink perspective" it looks like unnecessary nesting. The operation arguments describe the node, there's no need to nest things in another layer.