From: Heng Qi <hengqi@linux.alibaba.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, virtualization@lists.linux.dev,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Ratheesh Kannoth <rkannoth@marvell.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Subject: Re: [PATCH net-next v4 1/4] ethtool: provide customized dim profile management
Date: Tue, 9 Apr 2024 16:38:08 +0800 [thread overview]
Message-ID: <51ef6c48-d644-43b8-9b44-12f6a91f7e05@linux.alibaba.com> (raw)
In-Reply-To: <20240408121324.01dc4893@kernel.org>
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
next prev parent reply other threads:[~2024-04-09 8:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 3:44 [PATCH net-next v4 0/4] ethtool: provide the dim profile fine-tuning channel Heng Qi
2024-04-08 3:44 ` [PATCH net-next v4 1/4] ethtool: provide customized dim profile management Heng Qi
2024-04-08 19:09 ` Jakub Kicinski
2024-04-08 19:13 ` Jakub Kicinski
2024-04-09 8:38 ` Heng Qi [this message]
2024-04-08 3:44 ` [PATCH net-next v4 2/4] linux/dim: move profiles from .c to .h file Heng Qi
2024-04-08 3:44 ` [PATCH net-next v4 3/4] virtio-net: refactor dim initialization/destruction Heng Qi
2024-04-08 3:44 ` [PATCH net-next v4 4/4] virtio-net: support dim profile fine-tuning Heng Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51ef6c48-d644-43b8-9b44-12f6a91f7e05@linux.alibaba.com \
--to=hengqi@linux.alibaba.com \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).