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

Function sfc_rx_queue_setup

dpdk/drivers/net/sfc/sfc_ethdev.c:482–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482static int
483sfc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t ethdev_qid,
484 uint16_t nb_rx_desc, unsigned int socket_id,
485 const struct rte_eth_rxconf *rx_conf,
486 struct rte_mempool *mb_pool)
487{
488 struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
489 struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
490 sfc_ethdev_qid_t sfc_ethdev_qid = ethdev_qid;
491 struct sfc_rxq_info *rxq_info;
492 sfc_sw_index_t sw_index;
493 int rc;
494
495 sfc_log_init(sa, "RxQ=%u nb_rx_desc=%u socket_id=%u",
496 ethdev_qid, nb_rx_desc, socket_id);
497
498 sfc_adapter_lock(sa);
499
500 sw_index = sfc_rxq_sw_index_by_ethdev_rx_qid(sas, sfc_ethdev_qid);
501 rc = sfc_rx_qinit(sa, sw_index, nb_rx_desc, socket_id,
502 rx_conf, mb_pool);
503 if (rc != 0)
504 goto fail_rx_qinit;
505
506 rxq_info = sfc_rxq_info_by_ethdev_qid(sas, sfc_ethdev_qid);
507 dev->data->rx_queues[ethdev_qid] = rxq_info->dp;
508
509 sfc_adapter_unlock(sa);
510
511 return 0;
512
513fail_rx_qinit:
514 sfc_adapter_unlock(sa);
515 SFC_ASSERT(rc > 0);
516 return -rc;
517}
518
519static void
520sfc_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)

Callers

nothing calls this directly

Calls 5

sfc_adapter_by_eth_devFunction · 0.85
sfc_rx_qinitFunction · 0.85

Tested by

no test coverage detected