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

Function sfc_repr_dev_stop

dpdk/drivers/net/sfc/sfc_repr.c:343–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343static int
344sfc_repr_dev_stop(struct rte_eth_dev *dev)
345{
346 struct sfc_repr *sr = sfc_repr_by_eth_dev(dev);
347 uint16_t i;
348 int ret;
349
350 sfcr_info(sr, "entry");
351
352 sfc_repr_lock(sr);
353
354 ret = sfc_repr_stop(dev);
355 if (ret != 0) {
356 sfcr_err(sr, "%s() failed to stop representor", __func__);
357 goto fail_stop;
358 }
359
360 sfc_repr_unlock(sr);
361
362 for (i = 0; i < dev->data->nb_rx_queues; i++)
363 dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
364 for (i = 0; i < dev->data->nb_tx_queues; i++)
365 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED;
366
367 sfcr_info(sr, "done");
368
369 return 0;
370
371fail_stop:
372 sfc_repr_unlock(sr);
373
374 sfcr_err(sr, "%s() failed %s", __func__, rte_strerror(-ret));
375
376 return ret;
377}
378
379static int
380sfc_repr_check_conf(struct sfc_repr *sr, uint16_t nb_rx_queues,

Callers

nothing calls this directly

Calls 3

sfc_repr_by_eth_devFunction · 0.85
sfc_repr_stopFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected