From: tanhuazhong <tanhuazhong@huawei.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
<kuba@kernel.org>, <mkubecek@suse.cz>
Subject: Re: [RFC V2 net-next 1/2] ethtool: add support for controling the type of adaptive coalescing
Date: Sat, 21 Nov 2020 10:00:36 +0800 [thread overview]
Message-ID: <51257502-cf5e-0a98-5bbd-5e3d18d3e15a@huawei.com> (raw)
In-Reply-To: <20201120152548.GN1853236@lunn.ch>
On 2020/11/20 23:25, Andrew Lunn wrote:
>> @@ -310,6 +334,13 @@ int ethnl_set_coalesce(struct sk_buff *skb, struct genl_info *info)
>> ret = dev->ethtool_ops->set_coalesce(dev, &coalesce);
>> if (ret < 0)
>> goto out_ops;
>> +
>> + if (ops->set_ext_coalesce) {
>> + ret = ops->set_ext_coalesce(dev, &ext_coalesce);
>> + if (ret < 0)
>> + goto out_ops;
>> + }
>> +
>
> The problem here is, if ops->set_ext_coalesce() fails, you need to
> undo what dev->ethtool_ops->set_coalesce() did. From the users
> perspective, this should be atomic. It does everything, or it does
> nothing and returns an error code.
>
> And that is not easy given this structure of two op calls.
>
> Andrew
>
yes, i will try what Michal suggested in V1.
Regards.
Huazhong.
> .
>
next prev parent reply other threads:[~2020-11-21 2:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 6:24 [RFC V2 net-next 0/2] net: updates for -next Huazhong Tan
2020-11-20 6:24 ` [RFC V2 net-next 1/2] ethtool: add support for controling the type of adaptive coalescing Huazhong Tan
2020-11-20 15:25 ` Andrew Lunn
2020-11-21 2:00 ` tanhuazhong [this message]
2020-11-20 15:44 ` Jakub Kicinski
2020-11-20 6:24 ` [RFC V2 net-next 2/2] net: hns3: add support for dynamic interrupt moderation Huazhong Tan
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=51257502-cf5e-0a98-5bbd-5e3d18d3e15a@huawei.com \
--to=tanhuazhong@huawei.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®