[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9aad8548-8a3e-b88c-441f-805a0b71d709@huawei.com>
Date: Mon, 16 Aug 2021 11:29:54 +0800
From: moyufeng <moyufeng@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<shenjian15@...wei.com>, <lipeng321@...wei.com>,
<yisen.zhuang@...wei.com>, <linyunsheng@...wei.com>,
<huangguangbin2@...wei.com>, <chenhao288@...ilicon.com>,
<salil.mehta@...wei.com>, <linuxarm@...wei.com>,
<linuxarm@...neuler.org>, <dledford@...hat.com>, <jgg@...pe.ca>,
<netanel@...zon.com>, <akiyano@...zon.com>,
<thomas.lendacky@....com>, <irusskikh@...vell.com>,
<michael.chan@...adcom.com>, <edwin.peer@...adcom.com>,
<rohitm@...lsio.com>, <jacob.e.keller@...el.com>,
<ioana.ciornei@....com>, <vladimir.oltean@....com>,
<sgoutham@...vell.com>, <sbhatta@...vell.com>, <saeedm@...dia.com>,
<ecree.xilinx@...il.com>, <grygorii.strashko@...com>,
<merez@...eaurora.org>, <kvalo@...eaurora.org>,
<linux-wireless@...r.kernel.org>
Subject: Re: [RFC V3 net-next 1/4] ethtool: add two coalesce attributes for
CQE mode
On 2021/8/14 1:55, Jakub Kicinski wrote:
> On Fri, 13 Aug 2021 09:45:26 +0800 Yufeng Mo wrote:
>> Currently, there many drivers who support CQE mode configuration,
>> some configure it as a fixed when initialized, some provide an
>> interface to change it by ethtool private flags. In order make it
>> more generic, add two new 'ETHTOOL_A_COALESCE_USE_CQE_TX' and
>> 'ETHTOOL_A_COALESCE_USE_CQE_RX' coalesce attributes, then these
>> parameters can be accessed by ethtool netlink coalesce uAPI.
>>
>> Signed-off-by: Yufeng Mo <moyufeng@...wei.com>
>> Signed-off-by: Huazhong Tan <tanhuazhong@...wei.com>
>
> The series LGTM. When I was asking for documentation earlier I meant
> a paragraph explaining the difference between the two modes. Here is
> an example based on my current understanding, I could very well be
> wrong but you see what kind of explanation I'm after? If this is more
> or less correct please feel free to use it and modify as you see fit.
>
The description in the following document is consistent with my
understanding. I'll add the following paragraph and add
"Signed-off-by: Jakub Kicinski <kuba@...nel.org>" to the patch.
Thanks for your correction.
> diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
> index c86628e6a235..fc7ac5938aac 100644
> --- a/Documentation/networking/ethtool-netlink.rst
> +++ b/Documentation/networking/ethtool-netlink.rst
> @@ -939,12 +939,25 @@ Gets coalescing parameters like ``ETHTOOL_GCOALESCE`` ioctl request.
> ``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx
> ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx
> ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval
> + ``ETHTOOL_A_COALESCE_USE_CQE_TX`` bool timer reset mode, Tx
> + ``ETHTOOL_A_COALESCE_USE_CQE_RX`` bool timer reset mode, Rx
> =========================================== ====== =======================
>
> Attributes are only included in reply if their value is not zero or the
> corresponding bit in ``ethtool_ops::supported_coalesce_params`` is set (i.e.
> they are declared as supported by driver).
>
> +Timer reset mode (``ETHTOOL_A_COALESCE_USE_CQE_TX`` and
> +``ETHTOOL_A_COALESCE_USE_CQE_RX``) control the interaction between packet
> +arrival and the various time based delay parameters. By default timers are
> +expected to limit the max delay between any packet arrival/departure
> +and a corresponding interrupt. In this mode timer should be started by packet
> +arrival (sometimes delivery of previous interrupt) and reset when interrupt
> +is delivered.
> +Setting the appropriate attribute to 1 will enable ``CQE`` mode, where
> +each packet event resets the timer. In this mode timer is used to force
> +the interrupt if queue goes idle, while busy queues depend on the packet
> +limit to trigger interrupts.
>
> COALESCE_SET
> ============
> @@ -977,6 +990,8 @@ Sets coalescing parameters like ``ETHTOOL_SCOALESCE`` ioctl request.
> ``ETHTOOL_A_COALESCE_TX_USECS_HIGH`` u32 delay (us), high Tx
> ``ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH`` u32 max packets, high Tx
> ``ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL`` u32 rate sampling interval
> + ``ETHTOOL_A_COALESCE_USE_CQE_TX`` bool timer reset mode, Tx
> + ``ETHTOOL_A_COALESCE_USE_CQE_RX`` bool timer reset mode, Rx
> =========================================== ====== =======================
>
> Request is rejected if it attributes declared as unsupported by driver (i.e.
> .
>
Powered by blists - more mailing lists