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

Function mana_dev_start

dpdk/drivers/net/mana/mana.c:181–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181static int
182mana_dev_start(struct rte_eth_dev *dev)
183{
184 int ret;
185 struct mana_priv *priv = dev->data->dev_private;
186
187 rte_spinlock_init(&priv->mr_btree_lock);
188 ret = mana_mr_btree_init(&priv->mr_btree, MANA_MR_BTREE_CACHE_N,
189 dev->device->numa_node);
190 if (ret) {
191 DRV_LOG(ERR, "Failed to init device MR btree %d", ret);
192 return ret;
193 }
194
195 ret = mana_start_tx_queues(dev);
196 if (ret) {
197 DRV_LOG(ERR, "failed to start tx queues %d", ret);
198 goto failed_tx;
199 }
200
201 ret = mana_start_rx_queues(dev);
202 if (ret) {
203 DRV_LOG(ERR, "failed to start rx queues %d", ret);
204 goto failed_rx;
205 }
206
207 rte_wmb();
208
209 dev->tx_pkt_burst = mana_tx_burst;
210 dev->rx_pkt_burst = mana_rx_burst;
211
212 DRV_LOG(INFO, "TX/RX queues have started");
213
214 /* Enable datapath for secondary processes */
215 mana_mp_req_on_rxtx(dev, MANA_MP_REQ_START_RXTX);
216
217 ret = rxq_intr_enable(priv);
218 if (ret) {
219 DRV_LOG(ERR, "Failed to enable RX interrupts");
220 goto failed_intr;
221 }
222
223 return 0;
224
225failed_intr:
226 mana_stop_rx_queues(dev);
227
228failed_rx:
229 mana_stop_tx_queues(dev);
230
231failed_tx:
232 mana_mr_btree_free(&priv->mr_btree);
233
234 return ret;
235}
236
237static int
238mana_dev_stop(struct rte_eth_dev *dev)

Callers

nothing calls this directly

Calls 9

rte_spinlock_initFunction · 0.85
mana_mr_btree_initFunction · 0.85
mana_start_tx_queuesFunction · 0.85
mana_start_rx_queuesFunction · 0.85
mana_mp_req_on_rxtxFunction · 0.85
rxq_intr_enableFunction · 0.85
mana_stop_rx_queuesFunction · 0.85
mana_stop_tx_queuesFunction · 0.85
mana_mr_btree_freeFunction · 0.85

Tested by

no test coverage detected