MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpfl_rx_queue_start

Function cpfl_rx_queue_start

dpdk/drivers/net/cpfl/cpfl_rxtx.c:1180–1214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180int
1181cpfl_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
1216int
1217cpfl_tx_queue_init(struct rte_eth_dev *dev, uint16_t tx_queue_id)

Callers 1

cpfl_start_queuesFunction · 0.85

Calls 3

idpf_vc_rxq_configFunction · 0.85
cpfl_rx_queue_initFunction · 0.85
idpf_vc_queue_switchFunction · 0.85

Tested by

no test coverage detected