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

Function fs_dev_start

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

Source from the content-addressed store, hash-verified

125}
126
127static int
128fs_dev_start(struct rte_eth_dev *dev)
129{
130 struct sub_device *sdev;
131 uint8_t i;
132 int ret;
133
134 ret = fs_lock(dev, 0);
135 if (ret != 0)
136 return ret;
137 ret = failsafe_rx_intr_install(dev);
138 if (ret) {
139 fs_unlock(dev, 0);
140 return ret;
141 }
142 FOREACH_SUBDEV(sdev, i, dev) {
143 if (sdev->state != DEV_ACTIVE)
144 continue;
145 DEBUG("Starting sub_device %d", i);
146 ret = rte_eth_dev_start(PORT_ID(sdev));
147 if (ret) {
148 if (!fs_err(sdev, ret))
149 continue;
150 fs_unlock(dev, 0);
151 return ret;
152 }
153 ret = failsafe_rx_intr_install_subdevice(sdev);
154 if (ret) {
155 if (!fs_err(sdev, ret))
156 continue;
157 if (fs_err(sdev, rte_eth_dev_stop(PORT_ID(sdev))) < 0)
158 ERROR("Failed to stop sub-device %u",
159 SUB_ID(sdev));
160 fs_unlock(dev, 0);
161 return ret;
162 }
163 sdev->state = DEV_STARTED;
164 }
165 if (PRIV(dev)->state < DEV_STARTED) {
166 PRIV(dev)->state = DEV_STARTED;
167 fs_set_queues_state_start(dev);
168 }
169 fs_switch_dev(dev, NULL);
170 fs_unlock(dev, 0);
171 return 0;
172}
173
174static void
175fs_set_queues_state_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 9

fs_lockFunction · 0.85
failsafe_rx_intr_installFunction · 0.85
fs_unlockFunction · 0.85
rte_eth_dev_startFunction · 0.85
fs_errFunction · 0.85
rte_eth_dev_stopFunction · 0.85
fs_switch_devFunction · 0.85

Tested by

no test coverage detected