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 A4EE21F63F9; Tue, 14 Oct 2025 19:26: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=1760469966; cv=none; b=hDZEosLzhPSqlnYe2nkwJPLUza4JhI46MjtEGubUjAjHUXc8uyba+/mPNn0m9RzijGa7WE+TmiROP4fuK5VEndMuQmWZSkSx03wKU5lo9SxJuVHSFOi94U1pfwvxX2IZOIuibca8veLbTCNRCOonnkXrL3hBySKnmUlWzeE2lxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760469966; c=relaxed/simple; bh=o+wwp6IjOSEDNpKADFKUpT3S4jbIVkhAPLG7zoNAIqM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U7KG0+Hj0jIW5FgPLgAm6RELCpXEWc1aBIAf1c+GDEtmUty9bgY0GN4qE97BZsnD9xYBt46znMQPCCatzrsYL/2hciLnWadFJ+PFUX0wAjSeuViqoR0gGZdKjzf28jT+oLyogOOVZBaDK6uI0wOq4VY5mxeP7Ms1Gq6YbxeJhuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XT64Sr2v; 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="XT64Sr2v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0737CC4CEE7; Tue, 14 Oct 2025 19:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760469963; bh=o+wwp6IjOSEDNpKADFKUpT3S4jbIVkhAPLG7zoNAIqM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XT64Sr2vFmARywIxifSZhgSjBV70Jp/cQCdfLth0BrBiwBJkOl4X/AUthefUrRmr6 NGcZ39MRuFCV3lB6yyAkwYgZTZBj3RR1hKv3uFC5Vda+GNPK6TLTDgdoP82HNFv+ZD 3BnwWI/f2RPC9k5zJMqGpOqhB8g+RaTa4LkCtnfvEE0fj0WB6QNk382GVUudL2P/n6 KlKsxfs5IXdmDVV+Pta+bEbWC06SzC+IFTkfUFLnJLKZEJvFMflF/mMnB7FDnXPz2/ woCrQBPyVatqXz/IfagkwabVwX5aXEYuGvpFcsp8KdlmRZsWxVTfBDlg3H2h2OlHpW VfM/t5DnSNjaA== Date: Tue, 14 Oct 2025 12:26:01 -0700 From: Jakub Kicinski To: =?UTF-8?B?QXNiasO4cm4=?= Sloth =?UTF-8?B?VMO4bm5lc2Vu?= Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexei Starovoitov , Andrew Lunn , Arkadiusz Kubalewski , Daniel Borkmann , Daniel Zahka , Donald Hunter , Jacob Keller , Jesper Dangaard Brouer , Jiri Pirko , Joe Damato , John Fastabend , Jonathan Corbet , Simon Horman , Stanislav Fomichev , Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdl?= =?UTF-8?B?bnNlbg==?= , Vadim Fedorenko , Willem de Bruijn , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/6] tools: ynl-gen: refactor render-max enum generation Message-ID: <20251014122601.3ebcbf5a@kernel.org> In-Reply-To: <5c944395-141c-415b-b29a-8f70cafaa24d@fiberby.net> References: <20251013165005.83659-1-ast@fiberby.net> <20251013165005.83659-3-ast@fiberby.net> <20251013175826.6dbf6c78@kernel.org> <5c944395-141c-415b-b29a-8f70cafaa24d@fiberby.net> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 14 Oct 2025 17:04:14 +0000 Asbj=C3=B8rn Sloth T=C3=B8nnesen wrote: > On 10/14/25 12:58 AM, Jakub Kicinski wrote: > > On Mon, 13 Oct 2025 16:49:59 +0000 Asbj=C3=B8rn Sloth T=C3=B8nnesen wro= te: =20 > >> + suffix =3D yaml['type'] =3D=3D 'flags' and 'mask' or 'max' =20 > >=20 > > This construct looks highly non-pythonic to me =20 >=20 > I don't mind changing it to it's multi-line form, but this line might go > away (see below). >=20 > >> + self.enum_max_name =3D f'{self.value_pfx}{suffix}' =20 > >=20 > > sometimes its max sometimes is mask, so we shouldn't call it max always= =20 >=20 > I'm fine with splitting them to render-max, enum-max-name, render-mask and > enum-mask-name. I was just following along the current lines in the code, > as started in commit 96a611b6b60c. Ideally we'd find a general noun to describe both max and mask.. I don't have any great suggestions tho