/* Free up the existing queue */
if (eth_dev->data->tx_queues[queue_idx]) {
- cxgbe_dev_tx_queue_release(eth_dev->data->tx_queues[queue_idx]);
+ cxgbe_dev_tx_queue_release(eth_dev, queue_idx);
eth_dev->data->tx_queues[queue_idx] = NULL;
}
return err;
}
-void cxgbe_dev_tx_queue_release(void *q)
+void cxgbe_dev_tx_queue_release(struct rte_eth_dev *eth_dev, uint16_t qid)
{
- struct sge_eth_txq *txq = (struct sge_eth_txq *)q;
+ struct sge_eth_txq *txq = eth_dev->data->tx_queues[qid];
if (txq) {
struct port_info *pi = (struct port_info *)
/* Free up the existing queue */
if (eth_dev->data->rx_queues[queue_idx]) {
- cxgbe_dev_rx_queue_release(eth_dev->data->rx_queues[queue_idx]);
+ cxgbe_dev_rx_queue_release(eth_dev, queue_idx);
eth_dev->data->rx_queues[queue_idx] = NULL;
}
}
rxq->rspq.size = temp_nb_desc;
- if ((&rxq->fl) != NULL)
- rxq->fl.size = temp_nb_desc;
+ rxq->fl.size = temp_nb_desc;
/* Set to jumbo mode if necessary */
if (pkt_len > CXGBE_ETH_MAX_LEN)
return err;
}
-void cxgbe_dev_rx_queue_release(void *q)
+void cxgbe_dev_rx_queue_release(struct rte_eth_dev *eth_dev, uint16_t qid)
{
- struct sge_eth_rxq *rxq = (struct sge_eth_rxq *)q;
+ struct sge_eth_rxq *rxq = eth_dev->data->rx_queues[qid];
if (rxq) {
struct port_info *pi = (struct port_info *)