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 433B377F12; Wed, 24 Jan 2024 15:32:31 +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=1706110351; cv=none; b=WKhIpNS2VaPKzUV5XirwwIO8P1f9704Qt2rzFA1Oq7U5obLfTkuHaBz+smRTLBtvGiurvFcOuqzRCP0JlXWPpfTZC017kLl1um5brtptiwR97A75W47430Ut0bE5KaN8VmqBfEbADeJQuizZ0oo6NEdA4s50fE+6X1AKcemiGZM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110351; c=relaxed/simple; bh=PxSCMMeeR1jl9YG+jX7bY1BKQnReSnfXQPCmoYXwD0U=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PhWwZZS7cf6EaZID6S10SXIPq3pbDqlYmor/YRz1pMCoBth2jzXJNKg3scm5iN5iQ3ooDQhw1y4lYvGUIlbJudeT0aqYBDzWBjcdNZd/m+iismG0GLoWA3gwaPTGCSi2UJTmdJDBd5A5btYCNMuO70sWsP73hgUfPbIJJ4MnaIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bm6o3kfV; 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="Bm6o3kfV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B8E4C433F1; Wed, 24 Jan 2024 15:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706110350; bh=PxSCMMeeR1jl9YG+jX7bY1BKQnReSnfXQPCmoYXwD0U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Bm6o3kfVKhQjLtQ7sYKhcBJYUHwmN86juNOfKkI6sFDUhbOWq+9M8L2LjRbA4BzKo G9375ABG23xDPq7dFid4mzFJ3c7+I8rWHZpve89UxA8lJSnWeOsQxmB45pig0C18V4 VcxS8mb0eAM1t7AtnIx2ZdQgt3ZxY7gQaZFbu+EMJY/Hupw8XyIdmcvxe4bBNka9hu KIdrblZongFtVo93pyzaB5q5sxuCTkOP6kOJgORWxbTLjLn9kymP+WfJhDnDiLwrSZ +QwyQ53URMXkkVG99vzNh44HINkrtmIw6NUEBSmLUUQoRLh9JAPCTgZp0+A0dDR61d 7NbOrnOTZWW6w== Date: Wed, 24 Jan 2024 07:32:28 -0800 From: Jakub Kicinski To: Donald Hunter Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , linux-doc@vger.kernel.org, Jacob Keller , Breno Leitao , Jiri Pirko , Alessandro Marcolini , donald.hunter@redhat.com Subject: Re: [PATCH net-next v1 02/12] tools/net/ynl: Support sub-messages in nested attribute spaces Message-ID: <20240124073228.0e939e5c@kernel.org> In-Reply-To: References: <20240123160538.172-1-donald.hunter@gmail.com> <20240123160538.172-3-donald.hunter@gmail.com> <20240123161804.3573953d@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 Wed, 24 Jan 2024 09:37:31 +0000 Donald Hunter wrote: > > Meaning if the key is not found in current scope we'll silently and > > recursively try outer scopes? Did we already document that? > > I remember we discussed it, can you share a link to that discussion? > > Yes, it silently tries outer scopes. The previous discussion is here: > > https://patchwork.kernel.org/project/netdevbpf/patch/20231130214959.27377-7-donald.hunter@gmail.com/#25622101 > > This is the doc patch that describes sub-messages: > > https://patchwork.kernel.org/project/netdevbpf/patch/20231215093720.18774-4-donald.hunter@gmail.com/ > > It doesn't mention searching outer scopes so I can add that to the docs. I'm a tiny bit worried about the mis-ordered case. If the selector attr is after the sub-msg but outer scope has an attr of the same name we'll silently use the wrong one. It shouldn't happen in practice but can we notice the wrong ordering and error out cleanly?