| 143 | } |
| 144 | |
| 145 | static 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 | |
| 174 | static int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev, |
| 175 | uint16_t queue_idx) |
nothing calls this directly
no test coverage detected