DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD
@ 2021-05-07  9:08 Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 1/6] net/hns3: return code when PCI config space write fail Min Hu (Connor)
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

This patch set contains 6 bugfixes for hns3 PMD.

Chengwen Feng (5):
  net/hns3: return code when PCI config space write fail
  net/hns3: fix logging info when clear all FDIR rules
  net/hns3: clear hash map when clear all FDIR rules
  net/hns3: fix out param not set when query FDIR counter
  doc: add link status event pre-conditions

HongBo Zheng (1):
  net/hns3: fix VF setting alive order problem

 doc/guides/nics/hns3.rst          | 10 ++++++++++
 drivers/net/hns3/hns3_ethdev_vf.c | 22 ++++++++++++++++------
 drivers/net/hns3/hns3_fdir.c      | 22 +++++++++++++++++-----
 drivers/net/hns3/hns3_flow.c      |  2 ++
 4 files changed, 45 insertions(+), 11 deletions(-)

-- 
2.7.4


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

* [dpdk-dev] [PATCH 1/6] net/hns3: return code when PCI config space write fail
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix logging info when clear all FDIR rules Min Hu (Connor)
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

This patch returns error code when calling rte_pci_write_config() API.

Fixes: 6dd32ded17d8 ("net/hns3: check PCI config space write")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 6aa8a9b..71f3f95 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -156,9 +156,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
 		if (ret < 0) {
 			PMD_INIT_LOG(ERR, "failed to write PCI offset 0x%x",
 				    (pos + PCI_MSIX_FLAGS));
+			return -ENXIO;
 		}
+
 		return 0;
 	}
+
 	return -ENXIO;
 }
 
-- 
2.7.4


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

* [dpdk-dev] [PATCH 2/6] net/hns3: fix logging info when clear all FDIR rules
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 1/6] net/hns3: return code when PCI config space write fail Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 3/6] net/hns3: clear hash map " Min Hu (Connor)
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

If clear FDIR rules fail, the error code was logged, but the error code
was useless because it was the sum of all fail code.

This patch fixes it by log the success cnt and fail cnt.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: 8eed8acc812e ("net/hns3: add error code to some logs")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 0ef0938..e116d87 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1026,6 +1026,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	struct hns3_fdir_info *fdir_info = &pf->fdir;
 	struct hns3_fdir_rule_ele *fdir_filter;
 	struct hns3_hw *hw = &hns->hw;
+	int succ_cnt = 0;
+	int fail_cnt = 0;
 	int ret = 0;
 
 	/* flush flow director */
@@ -1034,17 +1036,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
 		TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-		ret += hns3_fd_tcam_config(hw, true,
-					   fdir_filter->fdir_conf.location,
-					   NULL, false);
+		ret = hns3_fd_tcam_config(hw, true,
+					  fdir_filter->fdir_conf.location,
+					  NULL, false);
+		if (ret == 0)
+			succ_cnt++;
+		else
+			fail_cnt++;
 		rte_free(fdir_filter);
 		fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	}
 
-	if (ret) {
-		hns3_err(hw, "Fail to delete FDIR filter, ret = %d", ret);
+	if (fail_cnt > 0) {
+		hns3_err(hw, "fail to delete all FDIR filter, success num = %d "
+			 "fail num = %d", succ_cnt, fail_cnt);
 		ret = -EIO;
 	}
+
 	return ret;
 }
 
-- 
2.7.4


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

* [dpdk-dev] [PATCH 3/6] net/hns3: clear hash map when clear all FDIR rules
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 1/6] net/hns3: return code when PCI config space write fail Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix logging info when clear all FDIR rules Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 4/6] net/hns3: fix VF setting alive order problem Min Hu (Connor)
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

The fdir hash map hold the pointers of fdir rule elements, it needs to
be set to NULL when clear all fdir rules.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index e116d87..d043f57 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1033,6 +1033,10 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	/* flush flow director */
 	rte_hash_reset(fdir_info->hash_handle);
 
+	memset(fdir_info->hash_map, 0,
+	       sizeof(struct hns3_fdir_rule_ele *) *
+	       fdir_info->fd_cfg.rule_num[HNS3_FD_STAGE_1]);
+
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
 		TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-- 
2.7.4


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

* [dpdk-dev] [PATCH 4/6] net/hns3: fix VF setting alive order problem
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
                   ` (2 preceding siblings ...)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 3/6] net/hns3: clear hash map " Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 5/6] net/hns3: fix out param not set when query FDIR counter Min Hu (Connor)
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: HongBo Zheng <zhenghongbo3@huawei.com>

Currently in the VF reset scenario, the VF performs the set
alive operation before restoring the configuration completed,
which may cause the hardware to work in an abnormal state.

This patch fix this problem by set VF alive after restoring
the configuration completed.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org

Signed-off-by: HongBo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 71f3f95..536ed46 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1891,12 +1891,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 		goto err_init_hardware;
 	}
 
-	ret = hns3vf_set_alive(hw, true);
-	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
-		goto err_init_hardware;
-	}
-
 	return 0;
 
 err_init_hardware:
@@ -1995,6 +1989,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 	hns3_rss_set_default_args(hw);
 
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
+		goto err_set_tc_queue;
+	}
+
 	return 0;
 
 err_set_tc_queue:
@@ -2706,6 +2706,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)
 		hns3_info(hw, "hns3vf dev restart successful!");
 	} else if (hw->adapter_state == HNS3_NIC_STOPPING)
 		hw->adapter_state = HNS3_NIC_CONFIGURED;
+
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		hns3_err(hw, "failed to VF send alive to PF: %d", ret);
+		goto err_vlan_table;
+	}
+
 	return 0;
 
 err_vlan_table:
-- 
2.7.4


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

* [dpdk-dev] [PATCH 5/6] net/hns3: fix out param not set when query FDIR counter
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
                   ` (3 preceding siblings ...)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 4/6] net/hns3: fix VF setting alive order problem Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions Min Hu (Connor)
  2021-05-11 16:30 ` [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Ferruh Yigit
  6 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

The hardware doesn't support counting the number of bytes that through
the fdir rule. Therefore, the corresponding out parameters (e.g.
bytes_set/bytes) is set to zero.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 65c7f6e..82810e0 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -223,6 +223,8 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	}
 	qc->hits_set = 1;
 	qc->hits = value;
+	qc->bytes_set = 0;
+	qc->bytes = 0;
 
 	return 0;
 }
-- 
2.7.4


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

* [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
                   ` (4 preceding siblings ...)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 5/6] net/hns3: fix out param not set when query FDIR counter Min Hu (Connor)
@ 2021-05-07  9:08 ` Min Hu (Connor)
  2021-05-11 16:14   ` Ferruh Yigit
  2021-06-30  1:56   ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
  2021-05-11 16:30 ` [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Ferruh Yigit
  6 siblings, 2 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-07  9:08 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds link status event pre-conditions.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 doc/guides/nics/hns3.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 4439df5..c3aded8 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -115,6 +115,16 @@ Runtime Config Options
   For example::
   -a 0000:7d:00.0,dev_caps_mask=0xF
 
+Link status event Pre-conditions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
+Therefore, to use the LSC for the PF driver, ensure that the firmware version
+also supports reporting link changes.
+If the VF driver needs to support LSC, special patch must be added:
+`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
+
 Driver compilation and testing
 ------------------------------
 
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions Min Hu (Connor)
@ 2021-05-11 16:14   ` Ferruh Yigit
  2021-05-12  1:05     ` Min Hu (Connor)
  2021-06-30  1:56   ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
  1 sibling, 1 reply; 16+ messages in thread
From: Ferruh Yigit @ 2021-05-11 16:14 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: Thomas Monjalon, David Marchand, techboard

On 5/7/2021 10:08 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> This patch adds link status event pre-conditions.
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
>  doc/guides/nics/hns3.rst | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
> index 4439df5..c3aded8 100644
> --- a/doc/guides/nics/hns3.rst
> +++ b/doc/guides/nics/hns3.rst
> @@ -115,6 +115,16 @@ Runtime Config Options
>    For example::
>    -a 0000:7d:00.0,dev_caps_mask=0xF
>  
> +Link status event Pre-conditions
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
> +Therefore, to use the LSC for the PF driver, ensure that the firmware version
> +also supports reporting link changes.
> +If the VF driver needs to support LSC, special patch must be added:
> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
> +

I am not sure about documenting a not released kernel patch for the support,
what about waiting kernel release for support?

cc'ed more people for comment.

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

* Re: [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD
  2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
                   ` (5 preceding siblings ...)
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions Min Hu (Connor)
@ 2021-05-11 16:30 ` Ferruh Yigit
  6 siblings, 0 replies; 16+ messages in thread
From: Ferruh Yigit @ 2021-05-11 16:30 UTC (permalink / raw)
  To: Min Hu (Connor), dev

On 5/7/2021 10:08 AM, Min Hu (Connor) wrote:
> This patch set contains 6 bugfixes for hns3 PMD.
> 
> Chengwen Feng (5):
>   net/hns3: return code when PCI config space write fail
>   net/hns3: fix logging info when clear all FDIR rules
>   net/hns3: clear hash map when clear all FDIR rules
>   net/hns3: fix out param not set when query FDIR counter
>   doc: add link status event pre-conditions
> 
> HongBo Zheng (1):
>   net/hns3: fix VF setting alive order problem
> 
>  doc/guides/nics/hns3.rst          | 10 ++++++++++
>  drivers/net/hns3/hns3_ethdev_vf.c | 22 ++++++++++++++++------
>  drivers/net/hns3/hns3_fdir.c      | 22 +++++++++++++++++-----
>  drivers/net/hns3/hns3_flow.c      |  2 ++
>  4 files changed, 45 insertions(+), 11 deletions(-)
> 

Except 6/6,
Series applied to dpdk-next-net/main, thanks.

Since 6/6 is a doc patch it has more time and it can be sent separately.

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

* Re: [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions
  2021-05-11 16:14   ` Ferruh Yigit
@ 2021-05-12  1:05     ` Min Hu (Connor)
  2021-06-30  2:00       ` Min Hu (Connor)
  0 siblings, 1 reply; 16+ messages in thread
From: Min Hu (Connor) @ 2021-05-12  1:05 UTC (permalink / raw)
  To: Ferruh Yigit, dev; +Cc: Thomas Monjalon, David Marchand, techboard



在 2021/5/12 0:14, Ferruh Yigit 写道:
> On 5/7/2021 10:08 AM, Min Hu (Connor) wrote:
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> This patch adds link status event pre-conditions.
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>> ---
>>   doc/guides/nics/hns3.rst | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
>> index 4439df5..c3aded8 100644
>> --- a/doc/guides/nics/hns3.rst
>> +++ b/doc/guides/nics/hns3.rst
>> @@ -115,6 +115,16 @@ Runtime Config Options
>>     For example::
>>     -a 0000:7d:00.0,dev_caps_mask=0xF
>>   
>> +Link status event Pre-conditions
>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> +
>> +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
>> +Therefore, to use the LSC for the PF driver, ensure that the firmware version
>> +also supports reporting link changes.
>> +If the VF driver needs to support LSC, special patch must be added:
>> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
>> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
>> +
> 
> I am not sure about documenting a not released kernel patch for the support,
> what about waiting kernel release for support?
> 
OK, I will send v2 after 5.13 kernel released, thanks.
> cc'ed more people for comment.
> .
> 

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

* [dpdk-dev] [PATCH v2] doc: add link status event pre-conditions
  2021-05-07  9:08 ` [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions Min Hu (Connor)
  2021-05-11 16:14   ` Ferruh Yigit
@ 2021-06-30  1:56   ` Min Hu (Connor)
  2021-07-02  8:55     ` Andrew Rybchenko
  1 sibling, 1 reply; 16+ messages in thread
From: Min Hu (Connor) @ 2021-06-30  1:56 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, thomas

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds link status event pre-conditions.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
v2:
* not modified, only waiting for 5.13 kernel released.
---
 doc/guides/nics/hns3.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index cf72810..c5c55d3 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -115,6 +115,16 @@ Runtime Config Options
   For example::
   -a 0000:7d:00.0,dev_caps_mask=0xF
 
+Link status event Pre-conditions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
+Therefore, to use the LSC for the PF driver, ensure that the firmware version
+also supports reporting link changes.
+If the VF driver needs to support LSC, special patch must be added:
+`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
+Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
+
 Driver compilation and testing
 ------------------------------
 
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions
  2021-05-12  1:05     ` Min Hu (Connor)
@ 2021-06-30  2:00       ` Min Hu (Connor)
  0 siblings, 0 replies; 16+ messages in thread
From: Min Hu (Connor) @ 2021-06-30  2:00 UTC (permalink / raw)
  To: Ferruh Yigit, dev; +Cc: Thomas Monjalon, David Marchand, techboard



在 2021/5/12 9:05, Min Hu (Connor) 写道:
> 
> 
> 在 2021/5/12 0:14, Ferruh Yigit 写道:
>> On 5/7/2021 10:08 AM, Min Hu (Connor) wrote:
>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>>
>>> This patch adds link status event pre-conditions.
>>>
>>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>>> ---
>>>   doc/guides/nics/hns3.rst | 10 ++++++++++
>>>   1 file changed, 10 insertions(+)
>>>
>>> diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
>>> index 4439df5..c3aded8 100644
>>> --- a/doc/guides/nics/hns3.rst
>>> +++ b/doc/guides/nics/hns3.rst
>>> @@ -115,6 +115,16 @@ Runtime Config Options
>>>     For example::
>>>     -a 0000:7d:00.0,dev_caps_mask=0xF
>>> +Link status event Pre-conditions
>>> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> +
>>> +Firmware 1.8.0.0 and later versions support reporting link changes 
>>> to the PF.
>>> +Therefore, to use the LSC for the PF driver, ensure that the 
>>> firmware version
>>> +also supports reporting link changes.
>>> +If the VF driver needs to support LSC, special patch must be added:
>>> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_. 
>>>
the patch has been merged.
>>> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
>>> +
>>
>> I am not sure about documenting a not released kernel patch for the 
>> support,
>> what about waiting kernel release for support?
>>
Hi, Ferruh, all,
5.13 kernel has released:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e

> OK, I will send v2 after 5.13 kernel released, thanks.
SO, I have sent v2, please check it. thanks.
>> cc'ed more people for comment.
>> .
>>
> .

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

* Re: [dpdk-dev] [PATCH v2] doc: add link status event pre-conditions
  2021-06-30  1:56   ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
@ 2021-07-02  8:55     ` Andrew Rybchenko
  2021-07-02 12:35       ` Thomas Monjalon
  0 siblings, 1 reply; 16+ messages in thread
From: Andrew Rybchenko @ 2021-07-02  8:55 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: ferruh.yigit, thomas

On 6/30/21 4:56 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> This patch adds link status event pre-conditions.
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
> v2:
> * not modified, only waiting for 5.13 kernel released.
> ---
>  doc/guides/nics/hns3.rst | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
> index cf72810..c5c55d3 100644
> --- a/doc/guides/nics/hns3.rst
> +++ b/doc/guides/nics/hns3.rst
> @@ -115,6 +115,16 @@ Runtime Config Options
>    For example::
>    -a 0000:7d:00.0,dev_caps_mask=0xF
>  
> +Link status event Pre-conditions
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
> +Therefore, to use the LSC for the PF driver, ensure that the firmware version
> +also supports reporting link changes.
> +If the VF driver needs to support LSC, special patch must be added:
> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
> +
>  Driver compilation and testing
>  ------------------------------
>  
> 

I've added extra empty lines before new section and changed
prefix to net/hns3 since doc sounds very misleading for me
here.

net/hns3: add link status event pre-conditions

Add link status event pre-conditions in the driver documentation.

Applied, thanks.

@Thomas I'm not 100% sure about such links in the
documentation. Please, double-check.

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

* Re: [dpdk-dev] [PATCH v2] doc: add link status event pre-conditions
  2021-07-02  8:55     ` Andrew Rybchenko
@ 2021-07-02 12:35       ` Thomas Monjalon
  2021-07-02 12:58         ` Andrew Rybchenko
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Monjalon @ 2021-07-02 12:35 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Min Hu (Connor), dev, ferruh.yigit

02/07/2021 10:55, Andrew Rybchenko:
> On 6/30/21 4:56 AM, Min Hu (Connor) wrote:
> > From: Chengwen Feng <fengchengwen@huawei.com>
> > +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
> > +Therefore, to use the LSC for the PF driver, ensure that the firmware version
> > +also supports reporting link changes.
> > +If the VF driver needs to support LSC, special patch must be added:
> > +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
> > +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
[...]
> @Thomas I'm not 100% sure about such links in the
> documentation. Please, double-check.

Not sure to understand what you are not 100% sure.
Please could you elaborate?



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

* Re: [dpdk-dev] [PATCH v2] doc: add link status event pre-conditions
  2021-07-02 12:35       ` Thomas Monjalon
@ 2021-07-02 12:58         ` Andrew Rybchenko
  2021-07-04 19:42           ` Thomas Monjalon
  0 siblings, 1 reply; 16+ messages in thread
From: Andrew Rybchenko @ 2021-07-02 12:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Min Hu (Connor), dev, ferruh.yigit

On 7/2/21 3:35 PM, Thomas Monjalon wrote:
> 02/07/2021 10:55, Andrew Rybchenko:
>> On 6/30/21 4:56 AM, Min Hu (Connor) wrote:
>>> From: Chengwen Feng <fengchengwen@huawei.com>
>>> +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
>>> +Therefore, to use the LSC for the PF driver, ensure that the firmware version
>>> +also supports reporting link changes.
>>> +If the VF driver needs to support LSC, special patch must be added:
>>> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
>>> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
> [...]
>> @Thomas I'm not 100% sure about such links in the
>> documentation. Please, double-check.
> 
> Not sure to understand what you are not 100% sure.
> Please could you elaborate?
> 

I think you replied my question. My goal was just
to draw your attention to it. Sometimes it is
undesirable to have links to the external resources
which could disappear and it would make the
documentation broken. I hope it is not the case.

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

* Re: [dpdk-dev] [PATCH v2] doc: add link status event pre-conditions
  2021-07-02 12:58         ` Andrew Rybchenko
@ 2021-07-04 19:42           ` Thomas Monjalon
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Monjalon @ 2021-07-04 19:42 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Min Hu (Connor), dev, ferruh.yigit

02/07/2021 14:58, Andrew Rybchenko:
> On 7/2/21 3:35 PM, Thomas Monjalon wrote:
> > 02/07/2021 10:55, Andrew Rybchenko:
> >> On 6/30/21 4:56 AM, Min Hu (Connor) wrote:
> >>> From: Chengwen Feng <fengchengwen@huawei.com>
> >>> +Firmware 1.8.0.0 and later versions support reporting link changes to the PF.
> >>> +Therefore, to use the LSC for the PF driver, ensure that the firmware version
> >>> +also supports reporting link changes.
> >>> +If the VF driver needs to support LSC, special patch must be added:
> >>> +`<https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/hisilicon/hns3?h=next-20210428&id=18b6e31f8bf4ac7af7b057228f38a5a530378e4e>`_.
> >>> +Note: The patch has been uploaded to 5.13 of the Linux kernel mainline.
> > [...]
> >> @Thomas I'm not 100% sure about such links in the
> >> documentation. Please, double-check.
> > 
> > Not sure to understand what you are not 100% sure.
> > Please could you elaborate?
> > 
> 
> I think you replied my question. My goal was just
> to draw your attention to it. Sometimes it is
> undesirable to have links to the external resources
> which could disappear and it would make the
> documentation broken. I hope it is not the case.

In this case, there is no better source than kernel.org :)



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

end of thread, other threads:[~2021-07-04 19:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  9:08 [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 1/6] net/hns3: return code when PCI config space write fail Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix logging info when clear all FDIR rules Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 3/6] net/hns3: clear hash map " Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 4/6] net/hns3: fix VF setting alive order problem Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 5/6] net/hns3: fix out param not set when query FDIR counter Min Hu (Connor)
2021-05-07  9:08 ` [dpdk-dev] [PATCH 6/6] doc: add link status event pre-conditions Min Hu (Connor)
2021-05-11 16:14   ` Ferruh Yigit
2021-05-12  1:05     ` Min Hu (Connor)
2021-06-30  2:00       ` Min Hu (Connor)
2021-06-30  1:56   ` [dpdk-dev] [PATCH v2] " Min Hu (Connor)
2021-07-02  8:55     ` Andrew Rybchenko
2021-07-02 12:35       ` Thomas Monjalon
2021-07-02 12:58         ` Andrew Rybchenko
2021-07-04 19:42           ` Thomas Monjalon
2021-05-11 16:30 ` [dpdk-dev] [PATCH 0/6] bugfix for hns3 PMD Ferruh Yigit

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