patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11 0/2] backport some patches to stable release 21.11.7
@ 2024-04-11  8:49 Jie Hai
  2024-04-11  8:49 ` [PATCH 21.11 1/2] net/axgbe: fix Rx and Tx queue state Jie Hai
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jie Hai @ 2024-04-11  8:49 UTC (permalink / raw)
  To: stable, ktraynor; +Cc: lihuisong, fegchengwen, liuyonglong, huangdengdui

Backport some patches to stable release 21.11.7

Jie Hai (2):
  net/axgbe: fix Rx and Tx queue state
  net/nfp: fix Rx and Tx queue state

 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 drivers/net/axgbe/axgbe_rxtx.c   | 2 ++
 drivers/net/nfp/nfp_ethdev.c     | 6 ++++++
 drivers/net/nfp/nfp_ethdev_vf.c  | 6 ++++++
 4 files changed, 20 insertions(+)

-- 
2.30.0


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

* [PATCH 21.11 1/2] net/axgbe: fix Rx and Tx queue state
  2024-04-11  8:49 [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Jie Hai
@ 2024-04-11  8:49 ` Jie Hai
  2024-04-11  8:49 ` [PATCH 21.11 2/2] net/nfp: " Jie Hai
  2024-04-18 12:31 ` [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Kevin Traynor
  2 siblings, 0 replies; 4+ messages in thread
From: Jie Hai @ 2024-04-11  8:49 UTC (permalink / raw)
  To: stable, ktraynor, Chandubabu Namburu, Lijun Ou, Ferruh Yigit,
	Chengwen Feng, Thomas Monjalon, Konstantin Ananyev
  Cc: lihuisong, fegchengwen, liuyonglong, huangdengdui

[ upstream commit 0236016c029de914c6ae083b1fa8ef2555d4c798 ]

The DPDK framework reports the queue state, which is stored in
dev->data->tx_queue_state and dev->data->rx_queue_state. The
state is maintained by the driver. Users may determine whether
a queue participates in packet forwarding based on the state.
Therefore, the driver needs to modify the queue state in time
according to the actual situation.

Fixes: 9ad9ff476cac ("ethdev: add queue state in queried queue information")
Cc: stable@dpdk.org

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
 drivers/net/axgbe/axgbe_rxtx.c   | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 5add4032354c..a7812f03c1c2 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -353,6 +353,7 @@ axgbe_dev_start(struct rte_eth_dev *dev)
 	int ret;
 	struct rte_eth_dev_data *dev_data = dev->data;
 	uint16_t max_pkt_len;
+	uint16_t i;
 
 	dev->dev_ops = &axgbe_eth_dev_ops;
 
@@ -397,6 +398,11 @@ axgbe_dev_start(struct rte_eth_dev *dev)
 	else
 		dev->rx_pkt_burst = &axgbe_recv_pkts;
 
+	for (i = 0; i < dev->data->nb_rx_queues; i++)
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+	for (i = 0; i < dev->data->nb_tx_queues; i++)
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+
 	return 0;
 }
 
diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
index 1de5b29f06c8..f993919637b1 100644
--- a/drivers/net/axgbe/axgbe_rxtx.c
+++ b/drivers/net/axgbe/axgbe_rxtx.c
@@ -928,6 +928,7 @@ void axgbe_dev_clear_queues(struct rte_eth_dev *dev)
 			axgbe_rx_queue_release(rxq);
 			dev->data->rx_queues[i] = NULL;
 		}
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 	}
 
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -937,6 +938,7 @@ void axgbe_dev_clear_queues(struct rte_eth_dev *dev)
 			axgbe_tx_queue_release(txq);
 			dev->data->tx_queues[i] = NULL;
 		}
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
 	}
 }
 
-- 
2.30.0


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

* [PATCH 21.11 2/2] net/nfp: fix Rx and Tx queue state
  2024-04-11  8:49 [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Jie Hai
  2024-04-11  8:49 ` [PATCH 21.11 1/2] net/axgbe: fix Rx and Tx queue state Jie Hai
@ 2024-04-11  8:49 ` Jie Hai
  2024-04-18 12:31 ` [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Kevin Traynor
  2 siblings, 0 replies; 4+ messages in thread
From: Jie Hai @ 2024-04-11  8:49 UTC (permalink / raw)
  To: stable, ktraynor, Heinrich Kuhn, Konstantin Ananyev, Lijun Ou,
	Ferruh Yigit, Thomas Monjalon, Chengwen Feng
  Cc: lihuisong, fegchengwen, liuyonglong, huangdengdui

[ upstream commit c46216e77ac3b1890eb622bea4bcc8c54f9da820 ]

The DPDK framework reports the queue state, which is stored in
dev->data->tx_queue_state and dev->data->rx_queue_state. The
state is maintained by the driver. Users may determine whether
a queue participates in packet forwarding based on the state.
Therefore, the driver needs to modify the queue state in time
according to the actual situation.

Fixes: 9ad9ff476cac ("ethdev: add queue state in queried queue information")
Cc: stable@dpdk.org

Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: Chaoyong He <chaoyong.he@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c    | 6 ++++++
 drivers/net/nfp/nfp_ethdev_vf.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index e1da0bdebed1..4edf08251c77 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -89,6 +89,7 @@ nfp_net_start(struct rte_eth_dev *dev)
 	struct rte_eth_conf *dev_conf;
 	struct rte_eth_rxmode *rxmode;
 	uint32_t intr_vector;
+	uint16_t i;
 	int ret;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -185,6 +186,11 @@ nfp_net_start(struct rte_eth_dev *dev)
 		nfp_eth_set_configured(dev->process_private,
 				       hw->nfp_idx, 1);
 
+	for (i = 0; i < dev->data->nb_rx_queues; i++)
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+	for (i = 0; i < dev->data->nb_tx_queues; i++)
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+
 	return 0;
 
 error:
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index 0dda3961ce57..a61c73a96e1c 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -57,6 +57,7 @@ nfp_netvf_start(struct rte_eth_dev *dev)
 	struct rte_eth_conf *dev_conf;
 	struct rte_eth_rxmode *rxmode;
 	uint32_t intr_vector;
+	uint16_t i;
 	int ret;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -133,6 +134,11 @@ nfp_netvf_start(struct rte_eth_dev *dev)
 		goto error;
 	}
 
+	for (i = 0; i < dev->data->nb_rx_queues; i++)
+		dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+	for (i = 0; i < dev->data->nb_tx_queues; i++)
+		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
+
 	return 0;
 
 error:
-- 
2.30.0


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

* Re: [PATCH 21.11 0/2] backport some patches to stable release 21.11.7
  2024-04-11  8:49 [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Jie Hai
  2024-04-11  8:49 ` [PATCH 21.11 1/2] net/axgbe: fix Rx and Tx queue state Jie Hai
  2024-04-11  8:49 ` [PATCH 21.11 2/2] net/nfp: " Jie Hai
@ 2024-04-18 12:31 ` Kevin Traynor
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Traynor @ 2024-04-18 12:31 UTC (permalink / raw)
  To: Jie Hai, stable; +Cc: lihuisong, fegchengwen, liuyonglong, huangdengdui

On 11/04/2024 09:49, Jie Hai wrote:
> Backport some patches to stable release 21.11.7
> 
> Jie Hai (2):
>   net/axgbe: fix Rx and Tx queue state
>   net/nfp: fix Rx and Tx queue state
> 
>  drivers/net/axgbe/axgbe_ethdev.c | 6 ++++++
>  drivers/net/axgbe/axgbe_rxtx.c   | 2 ++
>  drivers/net/nfp/nfp_ethdev.c     | 6 ++++++
>  drivers/net/nfp/nfp_ethdev_vf.c  | 6 ++++++
>  4 files changed, 20 insertions(+)
> 


Hi Jie. Thanks for the backports. I have pushed to 21.11 branch.

Kevin.


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

end of thread, other threads:[~2024-04-18 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11  8:49 [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Jie Hai
2024-04-11  8:49 ` [PATCH 21.11 1/2] net/axgbe: fix Rx and Tx queue state Jie Hai
2024-04-11  8:49 ` [PATCH 21.11 2/2] net/nfp: " Jie Hai
2024-04-18 12:31 ` [PATCH 21.11 0/2] backport some patches to stable release 21.11.7 Kevin Traynor

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