DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD
@ 2021-08-30  8:26 Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 1/3] net/hns3: fix queue flow action validation Min Hu (Connor)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-08-30  8:26 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

This patch contains three bugfixes for hns3 PMD.

Chengchang Tang (2):
  net/hns3: fix queue flow action validation
  net/hns3: fix new taskqueue pair reset command

Min Hu (Connor) (1):
  net/hns3: fix Tx push capability

 drivers/net/hns3/hns3_cmd.c  | 3 +++
 drivers/net/hns3/hns3_cmd.h  | 1 +
 drivers/net/hns3/hns3_flow.c | 8 ++++----
 drivers/net/hns3/hns3_rxtx.c | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.7.4


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

* [dpdk-dev] [PATCH 1/3] net/hns3: fix queue flow action validation
  2021-08-30  8:26 [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Min Hu (Connor)
@ 2021-08-30  8:26 ` Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 2/3] net/hns3: fix new taskqueue pair reset command Min Hu (Connor)
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-08-30  8:26 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

From: Chengchang Tang <tangchengchang@huawei.com>

The used_rx_queues only takes effect after device is started, and
its value is incorrect before the device is started. Therefore, it
is not suitable for flow action to use it to verify the queue index
before the device is started.

E.g. Enable dedicated queue in bonding device will configure a queue
flow action before start its slave devices. The above problem will
make this reasonable flow action configuration fail.

This patch use the nb_rx_queues from the configuration phase to
achieve verification.

Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Fixes: f8e7fcbfd0b8 ("net/hns3: support flow action of queue region")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index fc77979..841e0b9 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -275,10 +275,10 @@ hns3_handle_action_queue(struct rte_eth_dev *dev,
 	struct hns3_hw *hw = &hns->hw;
 
 	queue = (const struct rte_flow_action_queue *)action->conf;
-	if (queue->index >= hw->used_rx_queues) {
+	if (queue->index >= hw->data->nb_rx_queues) {
 		hns3_err(hw, "queue ID(%u) is greater than number of "
 			  "available queue (%u) in driver.",
-			  queue->index, hw->used_rx_queues);
+			  queue->index, hw->data->nb_rx_queues);
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  action, "Invalid queue ID in PF");
@@ -308,8 +308,8 @@ hns3_handle_action_queue_region(struct rte_eth_dev *dev,
 
 	if ((!rte_is_power_of_2(conf->queue_num)) ||
 		conf->queue_num > hw->rss_size_max ||
-		conf->queue[0] >= hw->used_rx_queues ||
-		conf->queue[0] + conf->queue_num > hw->used_rx_queues) {
+		conf->queue[0] >= hw->data->nb_rx_queues ||
+		conf->queue[0] + conf->queue_num > hw->data->nb_rx_queues) {
 		return rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_ACTION_CONF, action,
 			"Invalid start queue ID and queue num! the start queue "
-- 
2.7.4


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

* [dpdk-dev] [PATCH 2/3] net/hns3: fix new taskqueue pair reset command
  2021-08-30  8:26 [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 1/3] net/hns3: fix queue flow action validation Min Hu (Connor)
@ 2021-08-30  8:26 ` Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 3/3] net/hns3: fix Tx push capability Min Hu (Connor)
  2021-09-09 17:38 ` [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-08-30  8:26 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

From: Chengchang Tang <tangchengchang@huawei.com>

This new taskqueue pair reset command is used incorrectly, resulting in
the new command not taking effect.

This patch fix the incorrect use.

Fixes: 6911e7c22c61 ("net/hns3: fix long task queue pairs reset time")
Cc: stable@dpdk.org

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 0f222b3..481872e 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -697,7 +697,7 @@ hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
 
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CFG_RST_TRIGGER, false);
 	req = (struct hns3_reset_cmd *)desc.data;
-	hns3_set_bit(req->mac_func_reset, HNS3_CFG_RESET_RCB_B, 1);
+	hns3_set_bit(req->fun_reset_rcb, HNS3_CFG_RESET_RCB_B, 1);
 
 	/*
 	 * The start qid should be the global qid of the first tqp of the
-- 
2.7.4


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

* [dpdk-dev] [PATCH 3/3] net/hns3: fix Tx push capability
  2021-08-30  8:26 [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 1/3] net/hns3: fix queue flow action validation Min Hu (Connor)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 2/3] net/hns3: fix new taskqueue pair reset command Min Hu (Connor)
@ 2021-08-30  8:26 ` Min Hu (Connor)
  2021-09-09 17:38 ` [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Min Hu (Connor) @ 2021-08-30  8:26 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, andrew.rybchenko

This patch fixes Tx push capability to be compatible with Kunpeng 920,
as Tx push is only supported on Kunpeng 930.

Fixes: 23e317dd1fbf ("net/hns3: support Tx push quick doorbell for performance")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 3 +++
 drivers/net/hns3/hns3_cmd.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 928f938..6a1e634 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -423,6 +423,7 @@ hns3_get_caps_name(uint32_t caps_id)
 	} dev_caps[] = {
 		{ HNS3_CAPS_FD_QUEUE_REGION_B, "fd_queue_region" },
 		{ HNS3_CAPS_PTP_B,             "ptp"             },
+		{ HNS3_CAPS_TX_PUSH_B,         "tx_push"         },
 		{ HNS3_CAPS_PHY_IMP_B,         "phy_imp"         },
 		{ HNS3_CAPS_TQP_TXRX_INDEP_B,  "tqp_txrx_indep"  },
 		{ HNS3_CAPS_HW_PAD_B,          "hw_pad"          },
@@ -492,6 +493,8 @@ hns3_parse_capability(struct hns3_hw *hw,
 			hns3_warn(hw, "ignore PTP capability due to lack of "
 				  "rxd advanced layout capability.");
 	}
+	if (hns3_get_bit(caps, HNS3_CAPS_TX_PUSH_B))
+		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_TX_PUSH_B, 1);
 	if (hns3_get_bit(caps, HNS3_CAPS_PHY_IMP_B))
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 1);
 	if (hns3_get_bit(caps, HNS3_CAPS_TQP_TXRX_INDEP_B))
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 88683df..a4683de 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -315,6 +315,7 @@ enum HNS3_CAPS_BITS {
 	 */
 	HNS3_CAPS_FD_QUEUE_REGION_B = 2,
 	HNS3_CAPS_PTP_B,
+	HNS3_CAPS_TX_PUSH_B = 6,
 	HNS3_CAPS_PHY_IMP_B = 7,
 	HNS3_CAPS_TQP_TXRX_INDEP_B,
 	HNS3_CAPS_HW_PAD_B,
-- 
2.7.4


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

* Re: [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD
  2021-08-30  8:26 [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Min Hu (Connor)
                   ` (2 preceding siblings ...)
  2021-08-30  8:26 ` [dpdk-dev] [PATCH 3/3] net/hns3: fix Tx push capability Min Hu (Connor)
@ 2021-09-09 17:38 ` Ferruh Yigit
  3 siblings, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2021-09-09 17:38 UTC (permalink / raw)
  To: Min Hu (Connor), dev; +Cc: andrew.rybchenko

On 8/30/2021 9:26 AM, Min Hu (Connor) wrote:
> This patch contains three bugfixes for hns3 PMD.
> 
> Chengchang Tang (2):
>   net/hns3: fix queue flow action validation
>   net/hns3: fix new taskqueue pair reset command
> 
> Min Hu (Connor) (1):
>   net/hns3: fix Tx push capability
> 

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

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

end of thread, other threads:[~2021-09-09 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30  8:26 [dpdk-dev] [PATCH 0/3] bugfixes for hns3 PMD Min Hu (Connor)
2021-08-30  8:26 ` [dpdk-dev] [PATCH 1/3] net/hns3: fix queue flow action validation Min Hu (Connor)
2021-08-30  8:26 ` [dpdk-dev] [PATCH 2/3] net/hns3: fix new taskqueue pair reset command Min Hu (Connor)
2021-08-30  8:26 ` [dpdk-dev] [PATCH 3/3] net/hns3: fix Tx push capability Min Hu (Connor)
2021-09-09 17:38 ` [dpdk-dev] [PATCH 0/3] bugfixes 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).