| 1178 | } |
| 1179 | |
| 1180 | int |
| 1181 | cpfl_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
| 1182 | { |
| 1183 | struct cpfl_vport *cpfl_vport = dev->data->dev_private; |
| 1184 | struct idpf_vport *vport = &cpfl_vport->base; |
| 1185 | struct cpfl_rx_queue *cpfl_rxq = dev->data->rx_queues[rx_queue_id]; |
| 1186 | struct idpf_rx_queue *rxq = &cpfl_rxq->base; |
| 1187 | int err = 0; |
| 1188 | |
| 1189 | err = idpf_vc_rxq_config(vport, rxq); |
| 1190 | if (err != 0) { |
| 1191 | PMD_DRV_LOG(ERR, "Fail to configure Rx queue %u", rx_queue_id); |
| 1192 | return err; |
| 1193 | } |
| 1194 | |
| 1195 | err = cpfl_rx_queue_init(dev, rx_queue_id); |
| 1196 | if (err != 0) { |
| 1197 | PMD_DRV_LOG(ERR, "Failed to init RX queue %u", |
| 1198 | rx_queue_id); |
| 1199 | return err; |
| 1200 | } |
| 1201 | |
| 1202 | /* Ready to switch the queue on */ |
| 1203 | err = idpf_vc_queue_switch(vport, rx_queue_id, true, true); |
| 1204 | if (err != 0) { |
| 1205 | PMD_DRV_LOG(ERR, "Failed to switch RX queue %u on", |
| 1206 | rx_queue_id); |
| 1207 | } else { |
| 1208 | rxq->q_started = true; |
| 1209 | dev->data->rx_queue_state[rx_queue_id] = |
| 1210 | RTE_ETH_QUEUE_STATE_STARTED; |
| 1211 | } |
| 1212 | |
| 1213 | return err; |
| 1214 | } |
| 1215 | |
| 1216 | int |
| 1217 | cpfl_tx_queue_init(struct rte_eth_dev *dev, uint16_t tx_queue_id) |
no test coverage detected