2020-05-09 09:31:56

by Huazhong Tan

[permalink] [raw]
Subject: [PATCH net-next 0/5] net: hns3: misc updates for -next

This patchset includes some misc updates for the HNS3 ethernet driver.

#1 & #2 add two cleanups.
#3 provides an interface for the client to query the CMDQ's status.
#4 adds a little optimization about debugfs.
#5 prevents 1000M auto-negotiation off setting.

Huazhong Tan (3):
net: hns3: remove a redundant register macro definition
net: hns3: modify two uncorrect macro names
net: hns3: provide .get_cmdq_stat interface for the client

Yufeng Mo (2):
net: hns3: optimized the judgment of the input parameters of dump ncl
config
net: hns3: disable auto-negotiation off with 1000M setting in ethtool

drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 +
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 7 +++++-
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 4 ++--
.../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 15 ++++++++-----
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 1 -
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 25 ++++++++++++++--------
6 files changed, 35 insertions(+), 18 deletions(-)

--
2.7.4


2020-05-09 09:34:20

by Huazhong Tan

[permalink] [raw]
Subject: [PATCH net-next 2/5] net: hns3: modify two uncorrect macro names

According to the UM, command 0x0B03 and 0x0B13 are used to
query the statistics about TX and RX, not the status, so
modifies the unsuitable macro name of these two command.

Signed-off-by: Huazhong Tan <[email protected]>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 4 ++--
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
index 9a9d752..e3bab8f 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h
@@ -184,11 +184,11 @@ enum hclge_opcode_type {
/* TQP commands */
HCLGE_OPC_CFG_TX_QUEUE = 0x0B01,
HCLGE_OPC_QUERY_TX_POINTER = 0x0B02,
- HCLGE_OPC_QUERY_TX_STATUS = 0x0B03,
+ HCLGE_OPC_QUERY_TX_STATS = 0x0B03,
HCLGE_OPC_TQP_TX_QUEUE_TC = 0x0B04,
HCLGE_OPC_CFG_RX_QUEUE = 0x0B11,
HCLGE_OPC_QUERY_RX_POINTER = 0x0B12,
- HCLGE_OPC_QUERY_RX_STATUS = 0x0B13,
+ HCLGE_OPC_QUERY_RX_STATS = 0x0B13,
HCLGE_OPC_STASH_RX_QUEUE_LRO = 0x0B16,
HCLGE_OPC_CFG_RX_QUEUE_LRO = 0x0B17,
HCLGE_OPC_CFG_COM_TQP_QUEUE = 0x0B20,
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index f0b1dc9..3ad6a6a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -552,7 +552,7 @@ static int hclge_tqps_update_stats(struct hnae3_handle *handle)
queue = handle->kinfo.tqp[i];
tqp = container_of(queue, struct hclge_tqp, q);
/* command : HCLGE_OPC_QUERY_IGU_STAT */
- hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QUERY_RX_STATUS,
+ hclge_cmd_setup_basic_desc(&desc[0], HCLGE_OPC_QUERY_RX_STATS,
true);

desc[0].data[0] = cpu_to_le32((tqp->index & 0x1ff));
@@ -572,7 +572,7 @@ static int hclge_tqps_update_stats(struct hnae3_handle *handle)
tqp = container_of(queue, struct hclge_tqp, q);
/* command : HCLGE_OPC_QUERY_IGU_STAT */
hclge_cmd_setup_basic_desc(&desc[0],
- HCLGE_OPC_QUERY_TX_STATUS,
+ HCLGE_OPC_QUERY_TX_STATS,
true);

desc[0].data[0] = cpu_to_le32((tqp->index & 0x1ff));
--
2.7.4

2020-05-11 02:53:32

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH net-next 0/5] net: hns3: misc updates for -next

On Sat, 9 May 2020 17:27:36 +0800 Huazhong Tan wrote:
> This patchset includes some misc updates for the HNS3 ethernet driver.
>
> #1 & #2 add two cleanups.
> #3 provides an interface for the client to query the CMDQ's status.
> #4 adds a little optimization about debugfs.
> #5 prevents 1000M auto-negotiation off setting.

Applied, thank you!