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

Function close_ports

dpdk/examples/ethtool/ethtool-app/main.c:259–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259static void close_ports(void)
260{
261 uint16_t portid;
262 int ret;
263
264 for (portid = 0; portid < app_cfg.cnt_ports; portid++) {
265 printf("Closing port %d...", portid);
266 ret = rte_eth_dev_stop(portid);
267 if (ret != 0)
268 rte_exit(EXIT_FAILURE, "rte_eth_dev_stop: err=%s, port=%u\n",
269 strerror(-ret), portid);
270 rte_eth_dev_close(portid);
271 printf(" Done\n");
272 }
273}
274
275int main(int argc, char **argv)
276{

Callers 1

mainFunction · 0.85

Calls 4

rte_eth_dev_stopFunction · 0.85
rte_exitFunction · 0.85
rte_eth_dev_closeFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected