Use large VF queue stop request when large VF is enabled Fixes: 9cf9c02bf6ee ("net/iavf: add enable/disable queues for large VF") Cc: sta...@dpdk.org Cc: ting...@intel.com
Signed-off-by: Radu Nicolau <radu.nico...@intel.com> --- drivers/net/iavf/iavf_rxtx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 437055f76b..3292541ad9 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -958,6 +958,7 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_rx_queue *rxq; int err; @@ -966,7 +967,11 @@ iavf_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (rx_queue_id >= dev->data->nb_rx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, rx_queue_id, true, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, rx_queue_id, true, false); + else + err = iavf_switch_queue_lv(adapter, rx_queue_id, true, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", rx_queue_id); @@ -986,6 +991,7 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) { struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct iavf_tx_queue *txq; int err; @@ -994,7 +1000,11 @@ iavf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) if (tx_queue_id >= dev->data->nb_tx_queues) return -EINVAL; - err = iavf_switch_queue(adapter, tx_queue_id, false, false); + if (!vf->lv_enabled) + err = iavf_switch_queue(adapter, tx_queue_id, false, false); + else + err = iavf_switch_queue_lv(adapter, tx_queue_id, false, false); + if (err) { PMD_DRV_LOG(ERR, "Failed to switch TX queue %u off", tx_queue_id); -- 2.25.1