mbox series

[V2,net-next,00/11] net: hns3: updates for -next

Message ID 1604892159-19990-1-git-send-email-tanhuazhong@huawei.com
Headers show
Series net: hns3: updates for -next | expand

Message

Huazhong Tan Nov. 9, 2020, 3:22 a.m. UTC
There are several updates relating to the interrupt coalesce for
the HNS3 ethernet driver.

#1 adds support for QL(quantity limiting, interrupt coalesce
   based on the frame quantity).
#2 queries the maximum value of GL from the firmware instead of
   a fixed value in code.
#3 adds support for 1us unit GL(gap limiting, interrupt coalesce
   based on the gap time).
#4 renames gl_adapt_enable in struct hns3_enet_coalesce to fit
   its new usage.
#5 & #6 adds support for the dynamic interrupt moderation,
   and adds a control private flag in ethtool.
#7 adds wrapper function for state initialization.
#8 adds a check for the read-only private flag.
#9 & #10 adds support for EQ/CQ configuration, and adds a control
   private flag in ethtool.
#11 adds debugfs support for interrupt coalesce.

change log:
V2 - reorder #2 & #3 to fix compiler error.
     fix some checkpatch warnings in #10 & #11.

previous version:
V1: https://patchwork.ozlabs.org/project/netdev/cover/1604730681-32559-1-git-send-email-tanhuazhong@huawei.com/

Huazhong Tan (11):
  net: hns3: add support for configuring interrupt quantity limiting
  net: hns3: add support for querying maximum value of GL
  net: hns3: add support for 1us unit GL configuration
  net: hns3: rename gl_adapt_enable in struct hns3_enet_coalesce
  net: hns3: add support for dynamic interrupt moderation
  net: hns3: add ethtool priv-flag for DIM
  net: hns3: add hns3_state_init() to do state initialization
  net: hns3: add a check for ethtool priv-flag interface
  net: hns3: add support for EQ/CQ mode configuration
  net: hns3: add ethtool priv-flag for EQ/CQ
  net: hns3: add debugfs support for interrupt coalesce

 drivers/net/ethernet/hisilicon/Kconfig             |   1 +
 drivers/net/ethernet/hisilicon/hns3/hnae3.h        |  12 +
 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 127 ++++++++++
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c    | 258 ++++++++++++++++++---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.h    |  31 ++-
 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 185 ++++++++++++++-
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h |   8 +
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    |   8 +
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.h   |   8 +
 .../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c  |   8 +
 10 files changed, 607 insertions(+), 39 deletions(-)

Comments

Jakub Kicinski Nov. 11, 2020, 1:13 a.m. UTC | #1
On Mon, 9 Nov 2020 11:22:29 +0800 Huazhong Tan wrote:
> +	if (rx_vector->tx_group.coal.ql_enable)

                       ^^^^^^^^

Is this supposed to be rx_group, not tx?

> +		hns3_set_vector_coalesce_rx_ql(rx_vector,

> +					       rx_vector->rx_group.coal.int_ql);
Huazhong Tan Nov. 11, 2020, 1:15 a.m. UTC | #2
On 2020/11/11 9:13, Jakub Kicinski wrote:
> On Mon, 9 Nov 2020 11:22:29 +0800 Huazhong Tan wrote:

>> +	if (rx_vector->tx_group.coal.ql_enable)

>                         ^^^^^^^^

> 

> Is this supposed to be rx_group, not tx?

> 


yes, will fix it.
thanks.

>> +		hns3_set_vector_coalesce_rx_ql(rx_vector,

>> +					       rx_vector->rx_group.coal.int_ql);

> 

> .

>
Jakub Kicinski Nov. 11, 2020, 1:20 a.m. UTC | #3
On Mon, 9 Nov 2020 11:22:33 +0800 Huazhong Tan wrote:
> Add dynamic interrupt moderation support for the HNS3 driver.

> 

> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>


I'm slightly confused here. What does the adaptive moderation do in
your driver/device if you still need DIM on top of it?
Huazhong Tan Nov. 11, 2020, 2:31 a.m. UTC | #4
On 2020/11/11 9:20, Jakub Kicinski wrote:
> On Mon, 9 Nov 2020 11:22:33 +0800 Huazhong Tan wrote:

>> Add dynamic interrupt moderation support for the HNS3 driver.

>>

>> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>

> 

> I'm slightly confused here. What does the adaptive moderation do in

> your driver/device if you still need DIM on top of it?

> 


The driver's adaptive moderation and DIM are mutually-exclusive options,
and DIM is used by default. Since it is hard to verify all cases that
DIM can get a better result, so keep the adaptive moderation as an
option now, which can be swicthed by the ethtool priv-flag. If DIM is ok
for a long time, then we will send a separate patch to  remove the
adaptive moderation from the driver.

Thanks.
>