ethdev: fix checking Rx/Tx queue status
PATCH 1/1 ethdev: fix checking Rx/Tx queue status
Relax the check for queue setup, since some device may not update queue states during dev_stop.
--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
lib/librte_ethdev/rte_ethdev.c +6 -4
@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;
@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; txq = dev->data->tx_queues;
Signature · 1 line
2.11.0
Quoted 37 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)lib/librte_ethdev/rte_ethdev.c +3
-2@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id, RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id, RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ;
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-3-if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; txq = dev->data->tx_queues; --
That would break runtime queue setup.
Why not fix offending PMDs instead?
Quoted 1 line
2.11.0
Quoted 58 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statuslib/librte_ethdev/rte_ethdev.c rte_eth_rx_queue_setup(uint16_t port_id,
Quoted 22 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.cindexa357ee09f..34379642a100644lib/librte_ethdev/rte_ethdev.c +0
-0@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id,
uint16_trx_queue_id,lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id,
uint16_ttx_queue_id,Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ;
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 2 lines
lib/librte_ethdev/rte_ethdev.c +0
-1txq = dev->data->tx_queues; --That would break runtime queue setup.
Em... would you explain more, I can't figure out why this break runtime queue setup so far.
Quoted 1 line
Why not fix offending PMDs instead?
Ixgbe, i40e have this issue, not sure what about others. probably we should fix at rte_eth_dev_stop to save all PMD?
Quoted 2 lines
Quoted 2 lines
2.11.0
Ananyev, Konstantin
Acked-byQuoted 67 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 10:24 AM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 56 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statuslib/librte_ethdev/rte_ethdev.c rte_eth_rx_queue_setup(uint16_t port_id,
Quoted 22 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.cindexa357ee09f..34379642a100644lib/librte_ethdev/rte_ethdev.c +0
-0@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id,
uint16_trx_queue_id,lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id,
uint16_ttx_queue_id,Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ;
Quoted 6 lines
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 2 lines
lib/librte_ethdev/rte_ethdev.c +0
-1txq = dev->data->tx_queues; --That would break runtime queue setup.
Em... would you explain more, I can't figure out why this break runtime queue setup so far.
Ah yes, it was me not reading code properly.
So yep - you right it wouldn't break things.
Quoted 5 lines
Quoted 2 lines
Why not fix offending PMDs instead?
Ixgbe, i40e have this issue, not sure what about others. probably we should fix at
rte_eth_dev_stopto save all PMD?
Probably yes, that's a good thing to do in long term anyway.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
2.11.0
Quoted 95 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 5:51 PM
To: Zhang, Qi Z <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 70 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 10:24 AM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 58 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statuslib/librte_ethdev/rte_ethdev.c rte_eth_rx_queue_setup(uint16_t port_id,
Quoted 23 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.cindexa357ee09f..34379642a100644lib/librte_ethdev/rte_ethdev.c +0
-0@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id,
uint16_trx_queue_id,lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id,
uint16_ttx_queue_id,Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ;Quoted 6 lines
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 2 lines
lib/librte_ethdev/rte_ethdev.c +0
-1txq = dev->data->tx_queues; --That would break runtime queue setup.
Em... would you explain more, I can't figure out why this break runtime
queue setup so far.
Ah yes, it was me not reading code properly.
So yep - you right it wouldn't break things.Quoted 1 line
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Why not fix offending PMDs instead?
Ixgbe, i40e have this issue, not sure what about others. probably we should fix at
rte_eth_dev_stopto save all PMD?Probably yes, that's a good thing to do in long term anyway.
I'm thinking if it's better to move all queue state change into ethdev layer.
So there could be a patch to update queue states properly at dev_start/dev_stop/queue_start/queue_stop and maintainer help them self to cleanup PMD, and I think our proposed fix should be part of this. But for now, can we just keep current simple fix?
Regards
Qi
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
2.11.0
Quoted 109 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 1:34 PM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 98 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 5:51 PM
To: Zhang, Qi Z <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 70 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 10:24 AM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 58 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statuslib/librte_ethdev/rte_ethdev.c rte_eth_rx_queue_setup(uint16_t port_id,
Quoted 23 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.cindexa357ee09f..34379642a100644lib/librte_ethdev/rte_ethdev.c +0
-0@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id,
uint16_trx_queue_id,lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id,
uint16_ttx_queue_id,Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ;Quoted 6 lines
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 2 lines
lib/librte_ethdev/rte_ethdev.c +0
-1txq = dev->data->tx_queues; --That would break runtime queue setup.
Em... would you explain more, I can't figure out why this break runtime
queue setup so far.
Ah yes, it was me not reading code properly.
So yep - you right it wouldn't break things.Quoted 5 lines
Quoted 2 lines
Why not fix offending PMDs instead?
Ixgbe, i40e have this issue, not sure what about others. probably we should fix at
rte_eth_dev_stopto save all PMD?
Quoted 6 lines
Quoted 1 line
Probably yes, that's a good thing to do in long term anyway.
I'm thinking if it's better to move all queue state change into ethdev layer.
So there could be a patch to update queue states properly at dev_start/dev_stop/queue_start/queue_stop and maintainer help them self to cleanup PMD, and I think our proposed fix should be part of this.
But for now, can we just keep current simple fix?
Yes, I think that's a good one, that's why I acked it, see below. Konstantin
Quoted 10 lines
Regards
QiQuoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
2.11.0
Quoted 129 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 8:53 PM
To: Zhang, Qi Z <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 116 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 1:34 PM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 103 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 5:51 PM
To: Zhang, Qi Z <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 72 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 10:24 AM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 60 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statuslib/librte_ethdev/rte_ethdev.c rte_eth_rx_queue_setup(uint16_t port_id,
Quoted 25 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusRelax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>--- lib/librte_ethdev/rte_ethdev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/lib/librte_ethdev/rte_ethdev.cindexa357ee09f..34379642a100644lib/librte_ethdev/rte_ethdev.c +0
-0@@ -1479,8 +1479,9 @@ rte_eth_rx_queue_setup(uint16_t port_id,
uint16_trx_queue_id,lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 12 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->rx_queue_state[rx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->rx_queue_state[rx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ; rxq = dev->data->rx_queues;@@ -1611,8 +1612,9 @@ rte_eth_tx_queue_setup(uint16_t port_id,
uint16_ttx_queue_id,Quoted 10 lines
lib/librte_ethdev/rte_ethdev.c +3
-2RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP))return -EBUSY ; -if (dev->data->tx_queue_state[tx_queue_id] != -RTE_ETH_QUEUE_STATE_STOPPED ) +if (dev->data->dev_started && + (dev->data->tx_queue_state[tx_queue_id] != +RTE_ETH_QUEUE_STATE_STOPPED ))return -EBUSY ;Quoted 7 lines
Quoted 4 lines
lib/librte_ethdev/rte_ethdev.c rte_eth_tx_queue_setup(uint16_t port_id,
Quoted 2 lines
lib/librte_ethdev/rte_ethdev.c +0
-1txq = dev->data->tx_queues; --That would break runtime queue setup.
Em... would you explain more, I can't figure out why this break runtime
queue setup so far.
Ah yes, it was me not reading code properly.
So yep - you right it wouldn't break things.Quoted 5 lines
Quoted 2 lines
Why not fix offending PMDs instead?
Ixgbe, i40e have this issue, not sure what about others. probably we should fix at
rte_eth_dev_stopto save all PMD?Probably yes, that's a good thing to do in long term anyway.
Quoted 8 lines
Quoted 3 lines
I'm thinking if it's better to move all queue state change into ethdev layer. So there could be a patch to update queue states properly at dev_start/dev_stop/queue_start/queue_stop and maintainer help them self
to cleanup PMD, and I think our proposed fix should be part of this.
Quoted 1 line
But for now, can we just keep current simple fix?
Yes, I think that's a good one, that's why I acked it, see below. Konstantin
oh, I missed that :)
Quoted 11 lines
Quoted 11 lines
Regards
QiQuoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
2.11.0
Ferruh Yigit
AppliedQuoted 29 lines · Konstantin
Quoted 29 lines
-----Original Message-----
From: Zhang, Qi Z
Sent: Friday, May 11, 2018 10:24 AM
To: Ananyev, Konstantin <[email protected]>; Wu, Yanglong <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 18 lines
-----Original Message-----
From: Ananyev, Konstantin
Sent: Friday, May 11, 2018 4:39 PM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue statusQuoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Friday, May 11, 2018 9:22 AM
To: [email protected]
Cc: Zhang, Qi Z <[email protected]>; Lu, Wenzhuo <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Relax the check for queue setup, since some device may not update queue states during
dev_stop.Fixes cac923cfea47 ("ethdev: support runtime queue setup")Signed-off-by Yanglong Wu <[email protected]>
Applied to dpdk-next-net/master, thanks.