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

Function enicpmd_dev_tx_queue_setup

dpdk/drivers/net/enic/enic_ethdev.c:145–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145static int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
146 uint16_t queue_idx,
147 uint16_t nb_desc,
148 unsigned int socket_id,
149 const struct rte_eth_txconf *tx_conf)
150{
151 int ret;
152 struct enic *enic = pmd_priv(eth_dev);
153 struct vnic_wq *wq;
154
155 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
156 return -E_RTE_SECONDARY;
157
158 ENICPMD_FUNC_TRACE();
159 RTE_ASSERT(queue_idx < enic->conf_wq_count);
160 wq = &enic->wq[queue_idx];
161 wq->offloads = tx_conf->offloads |
162 eth_dev->data->dev_conf.txmode.offloads;
163 eth_dev->data->tx_queues[queue_idx] = (void *)wq;
164
165 ret = enic_alloc_wq(enic, queue_idx, socket_id, nb_desc);
166 if (ret) {
167 dev_err(enic, "error in allocating wq\n");
168 return ret;
169 }
170
171 return enicpmd_dev_setup_intr(enic);
172}
173
174static int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev,
175 uint16_t queue_idx)

Callers

nothing calls this directly

Calls 4

pmd_privFunction · 0.85
rte_eal_process_typeFunction · 0.85
enic_alloc_wqFunction · 0.85
enicpmd_dev_setup_intrFunction · 0.85

Tested by

no test coverage detected