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

Function memif_dev_start

dpdk/drivers/net/memif/rte_eth_memif.c:1358–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1356}
1357
1358static int
1359memif_dev_start(struct rte_eth_dev *dev)
1360{
1361 struct pmd_internals *pmd = dev->data->dev_private;
1362 int ret = 0;
1363 uint16_t i;
1364
1365 switch (pmd->role) {
1366 case MEMIF_ROLE_CLIENT:
1367 ret = memif_connect_client(dev);
1368 break;
1369 case MEMIF_ROLE_SERVER:
1370 ret = memif_connect_server(dev);
1371 break;
1372 default:
1373 MIF_LOG(ERR, "Unknown role: %d.", pmd->role);
1374 ret = -1;
1375 break;
1376 }
1377
1378 if (ret == 0) {
1379 for (i = 0; i < dev->data->nb_rx_queues; i++)
1380 dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
1381 for (i = 0; i < dev->data->nb_tx_queues; i++)
1382 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
1383 }
1384
1385 return ret;
1386}
1387
1388static int
1389memif_dev_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 2

memif_connect_clientFunction · 0.85
memif_connect_serverFunction · 0.85

Tested by

no test coverage detected