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

Function virtual_ethdev_stop

dpdk/app/test/virtual_pmd.c:51–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 return -1;
50}
51static int virtual_ethdev_stop(struct rte_eth_dev *eth_dev __rte_unused)
52{
53 void *pkt = NULL;
54 struct virtual_ethdev_private *prv = eth_dev->data->dev_private;
55
56 eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
57 eth_dev->data->dev_started = 0;
58 while (rte_ring_dequeue(prv->rx_queue, &pkt) != -ENOENT)
59 rte_pktmbuf_free(pkt);
60
61 while (rte_ring_dequeue(prv->tx_queue, &pkt) != -ENOENT)
62 rte_pktmbuf_free(pkt);
63
64 return 0;
65}
66
67static int
68virtual_ethdev_close(struct rte_eth_dev *dev __rte_unused)

Callers

nothing calls this directly

Calls 2

rte_ring_dequeueFunction · 0.85
rte_pktmbuf_freeFunction · 0.85

Tested by

no test coverage detected