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

Function cpfl_tx_queue_start

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

Source from the content-addressed store, hash-verified

1230}
1231
1232int
1233cpfl_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
1268int
1269cpfl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)

Callers 1

cpfl_start_queuesFunction · 0.85

Calls 3

idpf_vc_txq_configFunction · 0.85
cpfl_tx_queue_initFunction · 0.85
idpf_vc_queue_switchFunction · 0.85

Tested by

no test coverage detected