| 1230 | } |
| 1231 | |
| 1232 | int |
| 1233 | cpfl_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) |
| 1234 | { |
| 1235 | struct cpfl_vport *cpfl_vport = dev->data->dev_private; |
| 1236 | struct idpf_vport *vport = &cpfl_vport->base; |
| 1237 | struct cpfl_tx_queue *cpfl_txq = |
| 1238 | dev->data->tx_queues[tx_queue_id]; |
| 1239 | int err = 0; |
| 1240 | |
| 1241 | err = idpf_vc_txq_config(vport, &cpfl_txq->base); |
| 1242 | if (err != 0) { |
| 1243 | PMD_DRV_LOG(ERR, "Fail to configure Tx queue %u", tx_queue_id); |
| 1244 | return err; |
| 1245 | } |
| 1246 | |
| 1247 | err = cpfl_tx_queue_init(dev, tx_queue_id); |
| 1248 | if (err != 0) { |
| 1249 | PMD_DRV_LOG(ERR, "Failed to init TX queue %u", |
| 1250 | tx_queue_id); |
| 1251 | return err; |
| 1252 | } |
| 1253 | |
| 1254 | /* Ready to switch the queue on */ |
| 1255 | err = idpf_vc_queue_switch(vport, tx_queue_id, false, true); |
| 1256 | if (err != 0) { |
| 1257 | PMD_DRV_LOG(ERR, "Failed to switch TX queue %u on", |
| 1258 | tx_queue_id); |
| 1259 | } else { |
| 1260 | cpfl_txq->base.q_started = true; |
| 1261 | dev->data->tx_queue_state[tx_queue_id] = |
| 1262 | RTE_ETH_QUEUE_STATE_STARTED; |
| 1263 | } |
| 1264 | |
| 1265 | return err; |
| 1266 | } |
| 1267 | |
| 1268 | int |
| 1269 | cpfl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
no test coverage detected