MCPcopy Index your code
hub / github.com/F-Stack/f-stack / rte_eth_dev_reset

Function rte_eth_dev_reset

dpdk/lib/ethdev/rte_ethdev.c:1894–1917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1892}
1893
1894int
1895rte_eth_dev_reset(uint16_t port_id)
1896{
1897 struct rte_eth_dev *dev;
1898 int ret;
1899
1900 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
1901 dev = &rte_eth_devices[port_id];
1902
1903 if (*dev->dev_ops->dev_reset == NULL)
1904 return -ENOTSUP;
1905
1906 ret = rte_eth_dev_stop(port_id);
1907 if (ret != 0) {
1908 RTE_ETHDEV_LOG(ERR,
1909 "Failed to stop device (port %u) before reset: %s - ignore\n",
1910 port_id, rte_strerror(-ret));
1911 }
1912 ret = eth_err(port_id, dev->dev_ops->dev_reset(dev));
1913
1914 rte_ethdev_trace_reset(port_id, ret);
1915
1916 return ret;
1917}
1918
1919int
1920rte_eth_dev_is_removed(uint16_t port_id)

Callers 5

ut_teardown_rx_injectFunction · 0.85
reset_portFunction · 0.85

Calls 3

rte_eth_dev_stopFunction · 0.85
rte_strerrorFunction · 0.85
eth_errFunction · 0.85

Tested by 5

ut_teardown_rx_injectFunction · 0.68
reset_portFunction · 0.68