netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] net: hns3: misc updates for -next
@ 2020-05-09  9:27 Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 1/5] net: hns3: remove a redundant register macro definition Huazhong Tan
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Huazhong Tan

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net-next 1/5] net: hns3: remove a redundant register macro definition
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
@ 2020-05-09  9:27 ` Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 2/5] net: hns3: modify two uncorrect macro names Huazhong Tan
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Huazhong Tan

HCLGE_MISC_VECTOR_INT_STS and HCLGE_VECTOR_PF_OTHER_INT_STS_REG
both represent the misc interrupt status register(0x20800), so
removes HCLGE_VECTOR_PF_OTHER_INT_STS_REG and replaces it with
HCLGE_MISC_VECTOR_INT_STS.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h  |  1 -
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 12 +++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
index 876fd81a..608fe26 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
@@ -16,7 +16,6 @@
 #define HCLGE_RAS_REG_NFE_MASK   0xFF00
 #define HCLGE_RAS_REG_ROCEE_ERR_MASK   0x3000000
 
-#define HCLGE_VECTOR0_PF_OTHER_INT_STS_REG   0x20800
 #define HCLGE_VECTOR0_REG_MSIX_MASK   0x1FF00
 
 #define HCLGE_IMP_TCM_ECC_ERR_INT_EN	0xFFFF0000
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 71a54dd..f0b1dc9 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2968,13 +2968,11 @@ static int hclge_set_vf_link_state(struct hnae3_handle *handle, int vf,
 
 static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
 {
-	u32 rst_src_reg, cmdq_src_reg, msix_src_reg;
+	u32 cmdq_src_reg, msix_src_reg;
 
 	/* fetch the events from their corresponding regs */
-	rst_src_reg = hclge_read_dev(&hdev->hw, HCLGE_MISC_VECTOR_INT_STS);
 	cmdq_src_reg = hclge_read_dev(&hdev->hw, HCLGE_VECTOR0_CMDQ_SRC_REG);
-	msix_src_reg = hclge_read_dev(&hdev->hw,
-				      HCLGE_VECTOR0_PF_OTHER_INT_STS_REG);
+	msix_src_reg = hclge_read_dev(&hdev->hw, HCLGE_MISC_VECTOR_INT_STS);
 
 	/* Assumption: If by any chance reset and mailbox events are reported
 	 * together then we will only process reset event in this go and will
@@ -2984,7 +2982,7 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
 	 *
 	 * check for vector0 reset event sources
 	 */
-	if (BIT(HCLGE_VECTOR0_IMPRESET_INT_B) & rst_src_reg) {
+	if (BIT(HCLGE_VECTOR0_IMPRESET_INT_B) & msix_src_reg) {
 		dev_info(&hdev->pdev->dev, "IMP reset interrupt\n");
 		set_bit(HNAE3_IMP_RESET, &hdev->reset_pending);
 		set_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state);
@@ -2993,7 +2991,7 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
 		return HCLGE_VECTOR0_EVENT_RST;
 	}
 
-	if (BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B) & rst_src_reg) {
+	if (BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B) & msix_src_reg) {
 		dev_info(&hdev->pdev->dev, "global reset interrupt\n");
 		set_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state);
 		set_bit(HNAE3_GLOBAL_RESET, &hdev->reset_pending);
@@ -3483,7 +3481,7 @@ static enum hnae3_reset_type hclge_get_reset_level(struct hnae3_ae_dev *ae_dev,
 	/* first, resolve any unknown reset type to the known type(s) */
 	if (test_bit(HNAE3_UNKNOWN_RESET, addr)) {
 		u32 msix_sts_reg = hclge_read_dev(&hdev->hw,
-					HCLGE_VECTOR0_PF_OTHER_INT_STS_REG);
+					HCLGE_MISC_VECTOR_INT_STS);
 		/* we will intentionally ignore any errors from this function
 		 *  as we will end up in *some* reset request in any case
 		 */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 2/5] net: hns3: modify two uncorrect macro names
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 1/5] net: hns3: remove a redundant register macro definition Huazhong Tan
@ 2020-05-09  9:27 ` Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client Huazhong Tan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Huazhong Tan

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 <tanhuazhong@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 1/5] net: hns3: remove a redundant register macro definition Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 2/5] net: hns3: modify two uncorrect macro names Huazhong Tan
@ 2020-05-09  9:27 ` Huazhong Tan
  2020-05-09 20:48   ` Jakub Kicinski
  2020-05-09  9:27 ` [PATCH net-next 4/5] net: hns3: optimized the judgment of the input parameters of dump ncl config Huazhong Tan
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Huazhong Tan

This patch provides a new interface for the client to query
whether CMDQ is ready to work.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hnae3.h             | 1 +
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
index 5602bf2..7506cab 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
@@ -552,6 +552,7 @@ struct hnae3_ae_ops {
 	int (*set_vf_mac)(struct hnae3_handle *handle, int vf, u8 *p);
 	int (*get_module_eeprom)(struct hnae3_handle *handle, u32 offset,
 				 u32 len, u8 *data);
+	bool (*get_cmdq_stat)(struct hnae3_handle *handle);
 };
 
 struct hnae3_dcb_ops {
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 3ad6a6a..1ff896a 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -6402,6 +6402,14 @@ static bool hclge_get_hw_reset_stat(struct hnae3_handle *handle)
 	       hclge_read_dev(&hdev->hw, HCLGE_FUN_RST_ING);
 }
 
+static bool hclge_get_cmdq_stat(struct hnae3_handle *handle)
+{
+	struct hclge_vport *vport = hclge_get_vport(handle);
+	struct hclge_dev *hdev = vport->back;
+
+	return test_bit(HCLGE_STATE_CMD_DISABLE, &hdev->state);
+}
+
 static bool hclge_ae_dev_resetting(struct hnae3_handle *handle)
 {
 	struct hclge_vport *vport = hclge_get_vport(handle);
@@ -11311,6 +11319,7 @@ static const struct hnae3_ae_ops hclge_ops = {
 	.set_vf_rate = hclge_set_vf_rate,
 	.set_vf_mac = hclge_set_vf_mac,
 	.get_module_eeprom = hclge_get_module_eeprom,
+	.get_cmdq_stat = hclge_get_cmdq_stat,
 };
 
 static struct hnae3_ae_algo ae_algo = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 4/5] net: hns3: optimized the judgment of the input parameters of dump ncl config
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
                   ` (2 preceding siblings ...)
  2020-05-09  9:27 ` [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client Huazhong Tan
@ 2020-05-09  9:27 ` Huazhong Tan
  2020-05-09  9:27 ` [PATCH net-next 5/5] net: hns3: disable auto-negotiation off with 1000M setting in ethtool Huazhong Tan
  2020-05-11  2:47 ` [PATCH net-next 0/5] net: hns3: misc updates for -next Jakub Kicinski
  5 siblings, 0 replies; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Yufeng Mo, Huazhong Tan

From: Yufeng Mo <moyufeng@huawei.com>

This patch optimizes the judgment of the input parameters of dump ncl
config by checking the number and value of the input parameters apart.
It's clearer and more reasonable.

Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 .../net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
index 6cfa825..48c115c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
@@ -1258,6 +1258,7 @@ static void hclge_dbg_dump_ncl_config(struct hclge_dev *hdev,
 {
 #define HCLGE_MAX_NCL_CONFIG_OFFSET	4096
 #define HCLGE_NCL_CONFIG_LENGTH_IN_EACH_CMD	(20 + 24 * 4)
+#define HCLGE_NCL_CONFIG_PARAM_NUM	2
 
 	struct hclge_desc desc[HCLGE_CMD_NCL_CONFIG_BD_NUM];
 	int bd_num = HCLGE_CMD_NCL_CONFIG_BD_NUM;
@@ -1267,13 +1268,17 @@ static void hclge_dbg_dump_ncl_config(struct hclge_dev *hdev,
 	int ret;
 
 	ret = sscanf(cmd_buf, "%x %x", &offset, &length);
-	if (ret != 2 || offset >= HCLGE_MAX_NCL_CONFIG_OFFSET ||
-	    length > HCLGE_MAX_NCL_CONFIG_OFFSET - offset) {
-		dev_err(&hdev->pdev->dev, "Invalid offset or length.\n");
+	if (ret != HCLGE_NCL_CONFIG_PARAM_NUM) {
+		dev_err(&hdev->pdev->dev,
+			"Too few parameters, num = %d.\n", ret);
 		return;
 	}
-	if (offset < 0 || length <= 0) {
-		dev_err(&hdev->pdev->dev, "Non-positive offset or length.\n");
+
+	if (offset < 0 || offset >= HCLGE_MAX_NCL_CONFIG_OFFSET ||
+	    length <= 0 || length > HCLGE_MAX_NCL_CONFIG_OFFSET - offset) {
+		dev_err(&hdev->pdev->dev,
+			"Invalid input, offset = %d, length = %d.\n",
+			offset, length);
 		return;
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net-next 5/5] net: hns3: disable auto-negotiation off with 1000M setting in ethtool
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
                   ` (3 preceding siblings ...)
  2020-05-09  9:27 ` [PATCH net-next 4/5] net: hns3: optimized the judgment of the input parameters of dump ncl config Huazhong Tan
@ 2020-05-09  9:27 ` Huazhong Tan
  2020-05-11  2:47 ` [PATCH net-next 0/5] net: hns3: misc updates for -next Jakub Kicinski
  5 siblings, 0 replies; 10+ messages in thread
From: Huazhong Tan @ 2020-05-09  9:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm, kuba,
	Yufeng Mo, Huazhong Tan

From: Yufeng Mo <moyufeng@huawei.com>

The 802.3 specification does not specify the behavior of
auto-negotiation off with 1000M in PHY. Therefore, some PHY
compatibility issues occur. This patch forbids the setting of
this unreasonable mode by ethtool in driver.

Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
index 1a105f2..6b1545f 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
@@ -773,8 +773,13 @@ static int hns3_set_link_ksettings(struct net_device *netdev,
 		  cmd->base.autoneg, cmd->base.speed, cmd->base.duplex);
 
 	/* Only support ksettings_set for netdev with phy attached for now */
-	if (netdev->phydev)
+	if (netdev->phydev) {
+		if (cmd->base.speed == SPEED_1000 &&
+		    cmd->base.autoneg == AUTONEG_DISABLE)
+			return -EINVAL;
+
 		return phy_ethtool_ksettings_set(netdev->phydev, cmd);
+	}
 
 	if (handle->pdev->revision == 0x20)
 		return -EOPNOTSUPP;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client
  2020-05-09  9:27 ` [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client Huazhong Tan
@ 2020-05-09 20:48   ` Jakub Kicinski
  2020-05-11  0:13     ` tanhuazhong
  0 siblings, 1 reply; 10+ messages in thread
From: Jakub Kicinski @ 2020-05-09 20:48 UTC (permalink / raw)
  To: Huazhong Tan
  Cc: davem, netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm

On Sat, 9 May 2020 17:27:39 +0800 Huazhong Tan wrote:
> This patch provides a new interface for the client to query
> whether CMDQ is ready to work.
> 
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>

> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> index 5602bf2..7506cab 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> @@ -552,6 +552,7 @@ struct hnae3_ae_ops {
>  	int (*set_vf_mac)(struct hnae3_handle *handle, int vf, u8 *p);
>  	int (*get_module_eeprom)(struct hnae3_handle *handle, u32 offset,
>  				 u32 len, u8 *data);
> +	bool (*get_cmdq_stat)(struct hnae3_handle *handle);
>  };

I don't see anything in this series using this new interface, why is it
added now?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client
  2020-05-09 20:48   ` Jakub Kicinski
@ 2020-05-11  0:13     ` tanhuazhong
  2020-05-11  2:47       ` Jakub Kicinski
  0 siblings, 1 reply; 10+ messages in thread
From: tanhuazhong @ 2020-05-11  0:13 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm



On 2020/5/10 4:48, Jakub Kicinski wrote:
> On Sat, 9 May 2020 17:27:39 +0800 Huazhong Tan wrote:
>> This patch provides a new interface for the client to query
>> whether CMDQ is ready to work.
>>
>> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
> 
>> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
>> index 5602bf2..7506cab 100644
>> --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
>> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
>> @@ -552,6 +552,7 @@ struct hnae3_ae_ops {
>>   	int (*set_vf_mac)(struct hnae3_handle *handle, int vf, u8 *p);
>>   	int (*get_module_eeprom)(struct hnae3_handle *handle, u32 offset,
>>   				 u32 len, u8 *data);
>> +	bool (*get_cmdq_stat)(struct hnae3_handle *handle);
>>   };
> 
> I don't see anything in this series using this new interface, why is it
> added now?
> 

Hi, Jakub.

This interface is needed by the roce client, whose patch will be
upstreamed to the rdma tree, it is other branch. So we provide this 
interface previously, then the rdma guy will upstream their patch later,
maybe linux-5.8-rc*.

Thanks.

> .
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client
  2020-05-11  0:13     ` tanhuazhong
@ 2020-05-11  2:47       ` Jakub Kicinski
  0 siblings, 0 replies; 10+ messages in thread
From: Jakub Kicinski @ 2020-05-11  2:47 UTC (permalink / raw)
  To: tanhuazhong
  Cc: davem, netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm

On Mon, 11 May 2020 08:13:06 +0800 tanhuazhong wrote:
> On 2020/5/10 4:48, Jakub Kicinski wrote:
> > On Sat, 9 May 2020 17:27:39 +0800 Huazhong Tan wrote:  
> >> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> >> index 5602bf2..7506cab 100644
> >> --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> >> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h
> >> @@ -552,6 +552,7 @@ struct hnae3_ae_ops {
> >>   	int (*set_vf_mac)(struct hnae3_handle *handle, int vf, u8 *p);
> >>   	int (*get_module_eeprom)(struct hnae3_handle *handle, u32 offset,
> >>   				 u32 len, u8 *data);
> >> +	bool (*get_cmdq_stat)(struct hnae3_handle *handle);
> >>   };  
> > 
> > I don't see anything in this series using this new interface, why is it
> > added now?
> 
> This interface is needed by the roce client, whose patch will be
> upstreamed to the rdma tree, it is other branch. So we provide this 
> interface previously, then the rdma guy will upstream their patch later,
> maybe linux-5.8-rc*.

Understood. Please make sure to include this kind of information in the
cover letter in the future.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next 0/5] net: hns3: misc updates for -next
  2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
                   ` (4 preceding siblings ...)
  2020-05-09  9:27 ` [PATCH net-next 5/5] net: hns3: disable auto-negotiation off with 1000M setting in ethtool Huazhong Tan
@ 2020-05-11  2:47 ` Jakub Kicinski
  5 siblings, 0 replies; 10+ messages in thread
From: Jakub Kicinski @ 2020-05-11  2:47 UTC (permalink / raw)
  To: Huazhong Tan
  Cc: davem, netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm

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!

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-11  2:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  9:27 [PATCH net-next 0/5] net: hns3: misc updates for -next Huazhong Tan
2020-05-09  9:27 ` [PATCH net-next 1/5] net: hns3: remove a redundant register macro definition Huazhong Tan
2020-05-09  9:27 ` [PATCH net-next 2/5] net: hns3: modify two uncorrect macro names Huazhong Tan
2020-05-09  9:27 ` [PATCH net-next 3/5] net: hns3: provide .get_cmdq_stat interface for the client Huazhong Tan
2020-05-09 20:48   ` Jakub Kicinski
2020-05-11  0:13     ` tanhuazhong
2020-05-11  2:47       ` Jakub Kicinski
2020-05-09  9:27 ` [PATCH net-next 4/5] net: hns3: optimized the judgment of the input parameters of dump ncl config Huazhong Tan
2020-05-09  9:27 ` [PATCH net-next 5/5] net: hns3: disable auto-negotiation off with 1000M setting in ethtool Huazhong Tan
2020-05-11  2:47 ` [PATCH net-next 0/5] net: hns3: misc updates for -next Jakub Kicinski

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).