netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: moyufeng <moyufeng@huawei.com>
To: Jakub Kicinski <kuba@kernel.org>,
	Grygorii Strashko <grygorii.strashko@ti.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<shenjian15@huawei.com>, <lipeng321@huawei.com>,
	<yisen.zhuang@huawei.com>, <linyunsheng@huawei.com>,
	<huangguangbin2@huawei.com>, <chenhao288@hisilicon.com>,
	<salil.mehta@huawei.com>, <linuxarm@huawei.com>,
	<linuxarm@openeuler.org>, <dledford@redhat.com>, <jgg@ziepe.ca>,
	<netanel@amazon.com>, <akiyano@amazon.com>,
	<thomas.lendacky@amd.com>, <irusskikh@marvell.com>,
	<michael.chan@broadcom.com>, <edwin.peer@broadcom.com>,
	<rohitm@chelsio.com>, <jacob.e.keller@intel.com>,
	<ioana.ciornei@nxp.com>, <vladimir.oltean@nxp.com>,
	<sgoutham@marvell.com>, <sbhatta@marvell.com>,
	<saeedm@nvidia.com>, <ecree.xilinx@gmail.com>,
	<merez@codeaurora.org>, <kvalo@codeaurora.org>,
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH V3 net-next 2/4] ethtool: extend coalesce setting uAPI with CQE mode
Date: Tue, 24 Aug 2021 11:14:49 +0800	[thread overview]
Message-ID: <0380b0e4-eb5f-b74c-57e8-30c9ca38f0ff@huawei.com> (raw)
In-Reply-To: <659649ed-4697-e622-424d-0ab418c571a3@huawei.com>



On 2021/8/23 11:06, moyufeng wrote:
> 
> 
> On 2021/8/21 6:21, Jakub Kicinski wrote:
>> On Fri, 20 Aug 2021 21:27:13 +0300 Grygorii Strashko wrote:
>>> This is very big change which is not only mix two separate changes, but also looks
>>> half-done. From one side you're adding HW feature supported by limited number of HW,
>>> from another - changing most of net drivers to support it by generating mix of legacy
>>> and new kernel_ethtool_coalesce parameters.
>>>
>>> There is also an issue - you do not account get/set_per_queue_coalesce() in any way.
>>
>> ethtool's netlink interface does not support per queue coalescing.
>> I don't think it's fair to require it as part of this series.
>>
>>> Would it be possible to consider following, please?
>>>
>>> - move extack change out of this series
>>
>> Why? To have to change all the drivers twice?
>>
>>> - option (a)
>>>    add new callbacks in ethtool_ops as set_coalesce_cqe/get_coalesce_cqe for CQE support.
>>>    Only required drivers will need to be changed.
>>
>> All the params are changed as one operation from user space's
>> perspective. Having two ops would make it problematic for drivers 
>> to fail the entire op without modifying half of the parameters in 
>> a previous callback.
>>
>>> - option (b)
>>>    add struct ethtool_coalesce as first field of kernel_ethtool_coalesce
>>
>> This ends up being more painful than passing an extra parameter 
>> in my experience.
>>
>>> struct kernel_ethtool_coalesce {
>>> 	/* legacy */
>>> 	struct ethtool_coalesce coal;
>>>
>>> 	/* new */
>>> 	u8 use_cqe_mode_tx;
>>> 	u8 use_cqe_mode_rx;
>>> };
>>>
>>> --  then b.1
>>>    drivers can be updated as
>>>     static int set_coalesce(struct net_device *dev,
>>>     			    struct kernel_ethtool_coalesce *kernel_coal)
>>>     {
>>> 	struct ethtool_coalesce *coal = &kernel_coal->coal;
>>>     
>>>     (which will clearly indicate migration to the new interface )
>>>
>>> -- then b.2
>>>      add new callbacks in ethtool_ops as set_coalesce_ext/get_coalesce_ext (extended)
>>>      which will accept struct kernel_ethtool_coalesce as parameter an allow drivers to migrate when needed
>>>      (or as separate patch which will do only migration).
>>>
>>> Personally, I like "b.2".
>>
>> These options were considered. None of the options is great to 
>> be honest. Let's try the new params, I say. 
>> .
>>
> 
> Yes, these have been considered in previous RFCs. For details, please refer to [1].
> 
> [1]https://lore.kernel.org/netdev/20210526165633.3f7982c9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com/
> 
> .
> 
Hi Grygorii & Jakub

Is this patch still good? Or do I need to resend this series
with RFC link above in change log?

Thanks

  reply	other threads:[~2021-08-24  3:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20  7:35 [PATCH V3 net-next 0/4] ethtool: extend coalesce uAPI Yufeng Mo
2021-08-20  7:35 ` [PATCH V3 net-next 1/4] ethtool: add two coalesce attributes for CQE mode Yufeng Mo
2021-08-20  7:35 ` [PATCH V3 net-next 2/4] ethtool: extend coalesce setting uAPI with " Yufeng Mo
2021-08-20 18:27   ` Grygorii Strashko
2021-08-20 22:21     ` Jakub Kicinski
2021-08-23  3:06       ` moyufeng
2021-08-24  3:14         ` moyufeng [this message]
2021-09-14 17:31   ` Julian Wiedmann
2021-09-14 17:47     ` Jakub Kicinski
2021-08-20  7:35 ` [PATCH V3 net-next 3/4] net: hns3: add support for EQE/CQE mode configuration Yufeng Mo
2021-08-20  7:35 ` [PATCH V3 net-next 4/4] net: hns3: add ethtool support for CQE/EQE " Yufeng Mo
2021-08-24 16:10 ` [PATCH V3 net-next 0/4] ethtool: extend coalesce uAPI patchwork-bot+netdevbpf

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=0380b0e4-eb5f-b74c-57e8-30c9ca38f0ff@huawei.com \
    --to=moyufeng@huawei.com \
    --cc=akiyano@amazon.com \
    --cc=chenhao288@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=ecree.xilinx@gmail.com \
    --cc=edwin.peer@broadcom.com \
    --cc=grygorii.strashko@ti.com \
    --cc=huangguangbin2@huawei.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=irusskikh@marvell.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linuxarm@openeuler.org \
    --cc=linyunsheng@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=merez@codeaurora.org \
    --cc=michael.chan@broadcom.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=rohitm@chelsio.com \
    --cc=saeedm@nvidia.com \
    --cc=salil.mehta@huawei.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=shenjian15@huawei.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=yisen.zhuang@huawei.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 NNTP newsgroup(s).