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] [day] [month] [year] [list]
Message-ID: <51ef6c48-d644-43b8-9b44-12f6a91f7e05@linux.alibaba.com>
Date: Tue, 9 Apr 2024 16:38:08 +0800
From: Heng Qi <hengqi@...ux.alibaba.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, virtualization@...ts.linux.dev,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Jason Wang <jasowang@...hat.com>,
 "Michael S. Tsirkin" <mst@...hat.com>,
 Ratheesh Kannoth <rkannoth@...vell.com>,
 Alexander Lobakin <aleksander.lobakin@...el.com>,
 Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Subject: Re: [PATCH net-next v4 1/4] ethtool: provide customized dim profile
 management

Will modify things as you sugguested.

Thanks!


在 2024/4/9 上午3:13, Jakub Kicinski 写道:
> On Mon,  8 Apr 2024 11:44:27 +0800 Heng Qi wrote:
>> +	nla_for_each_nested(nest, nests, rem) {
>> +		if (WARN_ONCE(nla_type(nest) != ETHTOOL_A_MODERATIONS_MODERATION,
>> +			      "unexpected nest attrtype %u\n", nla_type(nest)))
> Maybe just use the newly added nla_for_each_nested_type()
>
>> +			return;
>> +
>> +		ret = nla_parse_nested(tb_moder,
>> +				       ARRAY_SIZE(coalesce_set_profile_policy) - 1,
>> +				       nest, coalesce_set_profile_policy,
>> +				       extack);
>> +		if (ret ||
> if parsing failed it will set the right error and extack, just return
> the error
>
>> +		    !tb_moder[ETHTOOL_A_MODERATION_USEC] ||
>> +		    !tb_moder[ETHTOOL_A_MODERATION_PKTS] ||
>> +		    !tb_moder[ETHTOOL_A_MODERATION_COMPS]) {
> If you miss an attr you should use NL_SET_ERR_ATTR_MISS() or such.
>
>> +			NL_SET_ERR_MSG(extack, "wrong ETHTOOL_A_MODERATION_* attribute\n");
> no new line at the end of the exact string


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ