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

Function rte_eth_dev_is_removed

dpdk/lib/ethdev/rte_ethdev.c:1919–1942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1917}
1918
1919int
1920rte_eth_dev_is_removed(uint16_t port_id)
1921{
1922 struct rte_eth_dev *dev;
1923 int ret;
1924
1925 RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
1926 dev = &rte_eth_devices[port_id];
1927
1928 if (dev->state == RTE_ETH_DEV_REMOVED)
1929 return 1;
1930
1931 if (*dev->dev_ops->is_removed == NULL)
1932 return 0;
1933
1934 ret = dev->dev_ops->is_removed(dev);
1935 if (ret != 0)
1936 /* Device is physically removed. */
1937 dev->state = RTE_ETH_DEV_REMOVED;
1938
1939 rte_ethdev_trace_is_removed(port_id, ret);
1940
1941 return ret;
1942}
1943
1944static int
1945rte_eth_check_rx_mempool(struct rte_mempool *mp, uint16_t offset,

Callers 3

eth_errFunction · 0.85
flow_errFunction · 0.85
fs_link_updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected