DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver
@ 2019-11-22 12:39 Wei Hu (Xavier)
  2019-11-22 12:39 ` [dpdk-dev] [PATCH 1/6] net/hns3: fix RSS hardware configuration restore failure Wei Hu (Xavier)
  2019-11-22 12:39 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries " Wei Hu (Xavier)
  0 siblings, 2 replies; 5+ messages in thread
From: Wei Hu (Xavier) @ 2019-11-22 12:39 UTC (permalink / raw)
  To: dev; +Cc: stable, xavier_huwei, xavier.huwei, huwei87

From: "Wei Hu (Xavier)" <xavier_huwei@163.com>

This series add some fixes for hns3 PMD driver.

Chengchang Tang (1):
  net/hns3: fix the error length limit of maiblox response

Hao Chen (1):
  net/hns3: fix RSS hardware configuration restore failure

Huisong Li (1):
  net/hns3: fix the strategy of getting link status for VF

Min Hu (Connor) (1):
  net/hns3: fix duplicate VLAN

Wei Hu (Xavier) (2):
  net/hns3: fix VF configuration table entries restore failure
  net/hns3: fix the failure sending packets less than 60 bytes

 drivers/net/hns3/hns3_ethdev.c    |  5 +++++
 drivers/net/hns3/hns3_ethdev.h    |  1 +
 drivers/net/hns3/hns3_ethdev_vf.c | 22 +++++++++++++++++-----
 drivers/net/hns3/hns3_mbx.c       |  4 +---
 drivers/net/hns3/hns3_mbx.h       |  6 ++++++
 drivers/net/hns3/hns3_rss.c       |  4 +---
 drivers/net/hns3/hns3_rxtx.c      | 24 ++++++++++++++++++++----
 7 files changed, 51 insertions(+), 15 deletions(-)

-- 
2.23.0


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

* [dpdk-dev] [PATCH 1/6] net/hns3: fix RSS hardware configuration restore failure
  2019-11-22 12:39 [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver Wei Hu (Xavier)
@ 2019-11-22 12:39 ` Wei Hu (Xavier)
  2019-11-22 12:39 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries " Wei Hu (Xavier)
  1 sibling, 0 replies; 5+ messages in thread
From: Wei Hu (Xavier) @ 2019-11-22 12:39 UTC (permalink / raw)
  To: dev; +Cc: stable, xavier_huwei, xavier.huwei, huwei87

From: Hao Chen <chenhao164@huawei.com>

This patch fixes the bug that hardware configuration called
tc_size doesn't restore to the initial value when starting
the app, configuring PFC and then restarting the app,
because of the tc_mode didn't initial when rss is disabled.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Cc: stable@dpdk.org

Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_rss.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 6a5d63398..b8c20e6d9 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -525,10 +525,8 @@ hns3_config_rss(struct hns3_adapter *hns)
 	enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode;
 
 	/* When there is no open RSS, redirect the packet queue 0 */
-	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0) {
+	if (((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) == 0)
 		hns3_rss_uninit(hns);
-		return 0;
-	}
 
 	/* Configure RSS hash algorithm and hash key offset */
 	ret = hns3_set_rss_algo_key(hw, hash_algo, hash_key);
-- 
2.23.0


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

* [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries restore failure
  2019-11-22 12:39 [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver Wei Hu (Xavier)
  2019-11-22 12:39 ` [dpdk-dev] [PATCH 1/6] net/hns3: fix RSS hardware configuration restore failure Wei Hu (Xavier)
@ 2019-11-22 12:39 ` Wei Hu (Xavier)
  1 sibling, 0 replies; 5+ messages in thread
From: Wei Hu (Xavier) @ 2019-11-22 12:39 UTC (permalink / raw)
  To: dev; +Cc: stable, xavier_huwei, xavier.huwei, huwei87

From: "Wei Hu (Xavier)" <xavier_huwei@163.com>

When the application using VF device exits abnormally, for example,
when it is killed by 'kill -9', kernel PF netdev driver also stores
the corresponding configuration table entries of VF device.

This patch fixes it by adding message of deleting VF configuration
table entry corresponds to the revision of kernel hns3 netdev
driver, the new message is added to notify the kernel PF netdev
driver to clean up the VF configuration initialization during VF
initialization.

This revision is compatible with the old version of kernel hns3
netdev driver. The old version of kernel pf netdev driver will
ignore this message.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier_huwei@163.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 14 ++++++++++++++
 drivers/net/hns3/hns3_mbx.h       |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 403674969..2274ac35e 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1096,6 +1096,14 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 	return ret;
 }
 
+static int
+hns3vf_clear_vport_list(struct hns3_hw *hw)
+{
+	return hns3_send_mbx_msg(hw, HNS3_MBX_HANDLE_VF_TBL,
+				 HNS3_MBX_VPORT_LIST_CLEAR, NULL, 0, false,
+				 NULL, 0);
+}
+
 static int
 hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 {
@@ -1147,6 +1155,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
 
+	ret = hns3vf_clear_vport_list(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to clear tbl list: %d", ret);
+		goto err_get_config;
+	}
+
 	ret = hns3vf_init_hardware(hns);
 	if (ret)
 		goto err_get_config;
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index ee6e82314..01eddb845 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -39,6 +39,8 @@ enum HNS3_MBX_OPCODE {
 	HNS3_MBX_SET_ALIVE,             /* (VF -> PF) set alive state */
 	HNS3_MBX_SET_MTU,               /* (VF -> PF) set mtu */
 	HNS3_MBX_GET_QID_IN_PF,         /* (VF -> PF) get queue id in pf */
+
+	HNS3_MBX_HANDLE_VF_TBL = 38,    /* (VF -> PF) store/clear hw cfg tbl */
 };
 
 /* below are per-VF mac-vlan subcodes */
@@ -58,6 +60,10 @@ enum hns3_mbx_vlan_cfg_subcode {
 	HNS3_MBX_VLAN_RX_OFF_CFG,               /* set rx side vlan offload */
 };
 
+enum hns3_mbx_tbl_cfg_subcode {
+	HNS3_MBX_VPORT_LIST_CLEAR = 0,
+};
+
 #define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
 #define HNS3_MBX_RING_MAP_BASIC_MSG_NUM	3
-- 
2.23.0


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

* Re: [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries restore failure
  2019-11-22 12:06 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries restore failure Wei Hu (Xavier)
@ 2019-11-22 15:42   ` Ferruh Yigit
  0 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2019-11-22 15:42 UTC (permalink / raw)
  To: Wei Hu (Xavier), dev, stable; +Cc: xavier_huwei, huwei87, Thomas Monjalon

On 11/22/2019 12:06 PM, Wei Hu (Xavier) wrote:
> From: "Wei Hu (Xavier)" <xavier_huwei@163.com>
> 
> When the application using VF device exits abnormally, for example,
> when it is killed by 'kill -9', kernel PF netdev driver also stores
> the corresponding configuration table entries of VF device.
> 
> This patch fixes it by adding message of deleting VF configuration
> table entry corresponds to the revision of kernel hns3 netdev
> driver, the new message is added to notify the kernel PF netdev
> driver to clean up the VF configuration initialization during VF
> initialization.
> 
> This revision is compatible with the old version of kernel hns3
> netdev driver. The old version of kernel pf netdev driver will
> ignore this message.
> 
> Fixes: a5475d61fa34 ("net/hns3: support VF")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier_huwei@163.com>

Hi Xavier,

We are trying the use unique identifier for same person as much as possible,
Above seems your personal email, I will update all occurrences as following, as
how git history knows you:
Wei Hu (Xavier) <xavier.huwei@huawei.com>

Please let us know if there is an objection/concern on this changes.

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

* [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries restore failure
  2019-11-22 12:06 [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver Wei Hu (Xavier)
@ 2019-11-22 12:06 ` Wei Hu (Xavier)
  2019-11-22 15:42   ` Ferruh Yigit
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Hu (Xavier) @ 2019-11-22 12:06 UTC (permalink / raw)
  To: dev, stable; +Cc: xavier_huwei, xavier.huwei, huwei87

From: "Wei Hu (Xavier)" <xavier_huwei@163.com>

When the application using VF device exits abnormally, for example,
when it is killed by 'kill -9', kernel PF netdev driver also stores
the corresponding configuration table entries of VF device.

This patch fixes it by adding message of deleting VF configuration
table entry corresponds to the revision of kernel hns3 netdev
driver, the new message is added to notify the kernel PF netdev
driver to clean up the VF configuration initialization during VF
initialization.

This revision is compatible with the old version of kernel hns3
netdev driver. The old version of kernel pf netdev driver will
ignore this message.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier_huwei@163.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 14 ++++++++++++++
 drivers/net/hns3/hns3_mbx.h       |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 403674969..2274ac35e 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1096,6 +1096,14 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 	return ret;
 }
 
+static int
+hns3vf_clear_vport_list(struct hns3_hw *hw)
+{
+	return hns3_send_mbx_msg(hw, HNS3_MBX_HANDLE_VF_TBL,
+				 HNS3_MBX_VPORT_LIST_CLEAR, NULL, 0, false,
+				 NULL, 0);
+}
+
 static int
 hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 {
@@ -1147,6 +1155,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
 
+	ret = hns3vf_clear_vport_list(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to clear tbl list: %d", ret);
+		goto err_get_config;
+	}
+
 	ret = hns3vf_init_hardware(hns);
 	if (ret)
 		goto err_get_config;
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index ee6e82314..01eddb845 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -39,6 +39,8 @@ enum HNS3_MBX_OPCODE {
 	HNS3_MBX_SET_ALIVE,             /* (VF -> PF) set alive state */
 	HNS3_MBX_SET_MTU,               /* (VF -> PF) set mtu */
 	HNS3_MBX_GET_QID_IN_PF,         /* (VF -> PF) get queue id in pf */
+
+	HNS3_MBX_HANDLE_VF_TBL = 38,    /* (VF -> PF) store/clear hw cfg tbl */
 };
 
 /* below are per-VF mac-vlan subcodes */
@@ -58,6 +60,10 @@ enum hns3_mbx_vlan_cfg_subcode {
 	HNS3_MBX_VLAN_RX_OFF_CFG,               /* set rx side vlan offload */
 };
 
+enum hns3_mbx_tbl_cfg_subcode {
+	HNS3_MBX_VPORT_LIST_CLEAR = 0,
+};
+
 #define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
 #define HNS3_MBX_RING_MAP_BASIC_MSG_NUM	3
-- 
2.23.0


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

end of thread, other threads:[~2019-11-22 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 12:39 [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver Wei Hu (Xavier)
2019-11-22 12:39 ` [dpdk-dev] [PATCH 1/6] net/hns3: fix RSS hardware configuration restore failure Wei Hu (Xavier)
2019-11-22 12:39 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries " Wei Hu (Xavier)
  -- strict thread matches above, loose matches on Subject: below --
2019-11-22 12:06 [dpdk-dev] [PATCH 0/6] Fixes for hns3 PMD driver Wei Hu (Xavier)
2019-11-22 12:06 ` [dpdk-dev] [PATCH 2/6] net/hns3: fix VF configuration table entries restore failure Wei Hu (Xavier)
2019-11-22 15:42   ` 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).