net/mlx5: rearrange creation of WQ and CQ object
[dpdk.git] / drivers / net / i40e / i40e_rxtx.c
index 840b6f3..60b33d2 100644 (file)
@@ -2928,6 +2928,7 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
                        continue;
                i40e_dev_rx_queue_release(dev->data->rx_queues[i]);
                dev->data->rx_queues[i] = NULL;
+               rte_eth_dma_zone_free(dev, "rx_ring", i);
        }
 
        for (i = 0; i < dev->data->nb_tx_queues; i++) {
@@ -2935,19 +2936,17 @@ i40e_dev_free_queues(struct rte_eth_dev *dev)
                        continue;
                i40e_dev_tx_queue_release(dev->data->tx_queues[i]);
                dev->data->tx_queues[i] = NULL;
+               rte_eth_dma_zone_free(dev, "tx_ring", i);
        }
 }
 
-#define I40E_FDIR_NUM_TX_DESC  I40E_MIN_RING_DESC
-#define I40E_FDIR_NUM_RX_DESC  I40E_MIN_RING_DESC
-
 enum i40e_status_code
 i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
 {
        struct i40e_tx_queue *txq;
        const struct rte_memzone *tz = NULL;
-       uint32_t ring_size;
        struct rte_eth_dev *dev;
+       uint32_t ring_size;
 
        if (!pf) {
                PMD_DRV_LOG(ERR, "PF is not available");
@@ -2987,12 +2986,14 @@ i40e_fdir_setup_tx_resources(struct i40e_pf *pf)
 
        txq->tx_ring_phys_addr = tz->iova;
        txq->tx_ring = (struct i40e_tx_desc *)tz->addr;
+
        /*
         * don't need to allocate software ring and reset for the fdir
         * program queue just set the queue has been configured.
         */
        txq->q_set = TRUE;
        pf->fdir.txq = txq;
+       pf->fdir.txq_available_buf_count = I40E_FDIR_PRG_PKT_CNT;
 
        return I40E_SUCCESS;
 }
@@ -3437,7 +3438,6 @@ i40e_set_default_pctype_table(struct rte_eth_dev *dev)
 }
 
 #ifndef RTE_LIBRTE_I40E_INC_VECTOR
-/* Stubs needed for linkage when CONFIG_RTE_LIBRTE_I40E_INC_VECTOR is set to 'n' */
 int
 i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev __rte_unused *dev)
 {