* [dpdk-dev] [PATCH 1/4] net/hns3: fix unsupported mbx msg id log error
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
@ 2021-05-10 13:38 ` Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 2/4] net/hns3: fix secondary process request start/stop Rx/Tx Min Hu (Connor)
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Min Hu (Connor) @ 2021-05-10 13:38 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Chengwen Feng <fengchengwen@huawei.com>
The mailbox message id is uint8_t, but the unsupported mailbox message
id was logged by uint16.
Fixes: 463e748964f5 ("net/hns3: support mailbox")
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_mbx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 31ab130..f36cb10 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -540,7 +540,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
break;
default:
hns3_err(hw, "received unsupported(%u) mbx msg",
- req->msg[0]);
+ opcode);
break;
}
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 2/4] net/hns3: fix secondary process request start/stop Rx/Tx
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 1/4] net/hns3: fix unsupported mbx msg id log error Min Hu (Connor)
@ 2021-05-10 13:38 ` Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 3/4] net/hns3: fix memory barrier incorrectly placed Min Hu (Connor)
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Min Hu (Connor) @ 2021-05-10 13:38 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Chengwen Feng <fengchengwen@huawei.com>
This secondary process should not send request to start/stop Rx/Tx,
this patch fixes it.
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")
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_mp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index ac0b5a0..cab784f 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -130,7 +130,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum hns3_mp_req_type type)
int ret;
int i;
- if (!hw->secondary_cnt)
+ if (rte_eal_process_type() == RTE_PROC_SECONDARY || !hw->secondary_cnt)
return;
if (type != HNS3_MP_REQ_START_RXTX && type != HNS3_MP_REQ_STOP_RXTX) {
hns3_err(hw, "port %u unknown request (req_type %d)",
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 3/4] net/hns3: fix memory barrier incorrectly placed
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 1/4] net/hns3: fix unsupported mbx msg id log error Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 2/4] net/hns3: fix secondary process request start/stop Rx/Tx Min Hu (Connor)
@ 2021-05-10 13:38 ` Min Hu (Connor)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 4/4] net/hns3: return fail if FEC mode not support Min Hu (Connor)
2021-05-11 18:09 ` [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Ferruh Yigit
4 siblings, 0 replies; 8+ messages in thread
From: Min Hu (Connor) @ 2021-05-10 13:38 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Chengwen Feng <fengchengwen@huawei.com>
The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")
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_mp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index cab784f..a8485f5 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -86,8 +86,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
case HNS3_MP_REQ_START_RXTX:
PMD_INIT_LOG(INFO, "port %u starting datapath",
dev->data->port_id);
- rte_mb();
hns3_set_rxtx_function(dev);
+ rte_mb();
mp_init_msg(dev, &mp_res, param->type);
res->result = 0;
ret = rte_mp_reply(&mp_res, peer);
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 4/4] net/hns3: return fail if FEC mode not support
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
` (2 preceding siblings ...)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 3/4] net/hns3: fix memory barrier incorrectly placed Min Hu (Connor)
@ 2021-05-10 13:38 ` Min Hu (Connor)
2021-05-11 18:09 ` [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Ferruh Yigit
4 siblings, 0 replies; 8+ messages in thread
From: Min Hu (Connor) @ 2021-05-10 13:38 UTC (permalink / raw)
To: dev; +Cc: ferruh.yigit
From: Chengwen Feng <fengchengwen@huawei.com>
If the FEC mode was not supported, it should return error code.
This patch also adds a space when log error info.
Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")
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.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 2056a37..0758ef5 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6991,9 +6991,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
return ret;
/* HNS3 PMD driver only support one bit set mode, e.g. 0x1, 0x4 */
- if (!is_fec_mode_one_bit_set(mode))
- hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD,"
+ if (!is_fec_mode_one_bit_set(mode)) {
+ hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
"FEC mode should be only one bit set", mode);
+ return -EINVAL;
+ }
/*
* Check whether the configured mode is within the FEC capability.
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD
2021-05-10 13:38 [dpdk-dev] [PATCH 0/4] bugfix for hns3 PMD Min Hu (Connor)
` (3 preceding siblings ...)
2021-05-10 13:38 ` [dpdk-dev] [PATCH 4/4] net/hns3: return fail if FEC mode not support Min Hu (Connor)
@ 2021-05-11 18:09 ` Ferruh Yigit
4 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2021-05-11 18:09 UTC (permalink / raw)
To: Min Hu (Connor), dev
On 5/10/2021 2:38 PM, Min Hu (Connor) wrote:
> This patch set contains four bugfix for hns3 PMD
>
> Chengwen Feng (4):
> net/hns3: fix unsupported mbx msg id log error
> net/hns3: fix secondary process request start/stop Rx/Tx
> net/hns3: fix memory barrier incorrectly placed
> net/hns3: return fail if FEC mode not support
>
Series applied to dpdk-next-net/main, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread