lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqzCWQwACMQ3RQaw@nanopsycho.orion>
Date: Fri, 2 Aug 2024 13:26:17 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
	Madhu Chittim <madhu.chittim@...el.com>,
	Sridhar Samudrala <sridhar.samudrala@...el.com>,
	Simon Horman <horms@...nel.org>,
	John Fastabend <john.fastabend@...il.com>,
	Sunil Kovvuri Goutham <sgoutham@...vell.com>,
	Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [PATCH v3 02/12] netlink: spec: add shaper YAML spec

Tue, Jul 30, 2024 at 10:39:45PM CEST, pabeni@...hat.com wrote:

[...]

>+const struct nla_policy net_shaper_ns_info_nl_policy[NET_SHAPER_A_WEIGHT + 1] = {
>+	[NET_SHAPER_A_HANDLE] = NLA_POLICY_NESTED(net_shaper_handle_nl_policy),
>+	[NET_SHAPER_A_METRIC] = NLA_POLICY_MAX(NLA_U32, 1),
>+	[NET_SHAPER_A_BW_MIN] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_BW_MAX] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_BURST] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_PRIORITY] = { .type = NLA_U32, },
>+	[NET_SHAPER_A_WEIGHT] = { .type = NLA_U32, },
>+};
>+
>+const struct nla_policy net_shaper_ns_output_info_nl_policy[NET_SHAPER_A_PARENT + 1] = {
>+	[NET_SHAPER_A_PARENT] = NLA_POLICY_NESTED(net_shaper_handle_nl_policy),
>+	[NET_SHAPER_A_HANDLE] = NLA_POLICY_NESTED(net_shaper_handle_nl_policy),
>+	[NET_SHAPER_A_METRIC] = NLA_POLICY_MAX(NLA_U32, 1),
>+	[NET_SHAPER_A_BW_MIN] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_BW_MAX] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_BURST] = { .type = NLA_UINT, },
>+	[NET_SHAPER_A_PRIORITY] = { .type = NLA_U32, },
>+	[NET_SHAPER_A_WEIGHT] = { .type = NLA_U32, },

Since this is the same set as above only extended by parent, wouldn't it
be better to nest it and have it only once?

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ