> -----Original Message-----
> From: Ananyev, Konstantin
> Sent: Friday, May 11, 2018 4:39 PM
> To: Wu, Yanglong <yanglong...@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Lu, Wenzhuo
> <wenzhuo...@intel.com>; Wu, Yanglong <yanglong...@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yanglong Wu
> > Sent: Friday, May 11, 2018 9:22 AM
> > To: dev@dpdk.org
> > Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Lu, Wenzhuo
> > <wenzhuo...@intel.com>; Wu, Yanglong <yanglong...@intel.com>
> > Subject: [dpdk-dev] [PATCH] ethdev: fix checking Rx/Tx queue status
> >
> > 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 <yanglong...@intel.com>
> > ---
> >  lib/librte_ethdev/rte_ethdev.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/librte_ethdev/rte_ethdev.c
> > b/lib/librte_ethdev/rte_ethdev.c index a357ee09f..34379642a 100644
> > --- a/lib/librte_ethdev/rte_ethdev.c
> > +++ b/lib/librte_ethdev/rte_ethdev.c
> > @@ -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;
> > --
> 
> That would break runtime queue setup.

Em... would you explain more, I can't figure out why this break runtime queue 
setup so far.

> 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?

> 
> > 2.11.0

Reply via email to