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

Function fs_dev_stop

dpdk/drivers/net/failsafe/failsafe_ops.c:189–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189static int
190fs_dev_stop(struct rte_eth_dev *dev)
191{
192 struct sub_device *sdev;
193 uint8_t i;
194 int ret;
195
196 ret = fs_lock(dev, 0);
197 if (ret != 0)
198 return ret;
199 PRIV(dev)->state = DEV_STARTED - 1;
200 FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_STARTED) {
201 ret = rte_eth_dev_stop(PORT_ID(sdev));
202 if (fs_err(sdev, ret) < 0) {
203 ERROR("Failed to stop device %u",
204 PORT_ID(sdev));
205 PRIV(dev)->state = DEV_STARTED + 1;
206 fs_unlock(dev, 0);
207 return ret;
208 }
209 failsafe_rx_intr_uninstall_subdevice(sdev);
210 sdev->state = DEV_STARTED - 1;
211 }
212 failsafe_rx_intr_uninstall(dev);
213 fs_set_queues_state_stop(dev);
214 fs_unlock(dev, 0);
215
216 return 0;
217}
218
219static int
220fs_dev_set_link_up(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 8

fs_lockFunction · 0.85
FOREACH_SUBDEV_STATEFunction · 0.85
rte_eth_dev_stopFunction · 0.85
fs_errFunction · 0.85
fs_unlockFunction · 0.85
fs_set_queues_state_stopFunction · 0.85

Tested by

no test coverage detected