| 1633 | } |
| 1634 | |
| 1635 | static int |
| 1636 | tap_tx_queue_setup(struct rte_eth_dev *dev, |
| 1637 | uint16_t tx_queue_id, |
| 1638 | uint16_t nb_tx_desc __rte_unused, |
| 1639 | unsigned int socket_id __rte_unused, |
| 1640 | const struct rte_eth_txconf *tx_conf) |
| 1641 | { |
| 1642 | struct pmd_internals *internals = dev->data->dev_private; |
| 1643 | struct pmd_process_private *process_private = dev->process_private; |
| 1644 | struct tx_queue *txq; |
| 1645 | int ret; |
| 1646 | uint64_t offloads; |
| 1647 | |
| 1648 | if (tx_queue_id >= dev->data->nb_tx_queues) |
| 1649 | return -1; |
| 1650 | dev->data->tx_queues[tx_queue_id] = &internals->txq[tx_queue_id]; |
| 1651 | txq = dev->data->tx_queues[tx_queue_id]; |
| 1652 | txq->out_port = dev->data->port_id; |
| 1653 | txq->queue_id = tx_queue_id; |
| 1654 | |
| 1655 | offloads = tx_conf->offloads | dev->data->dev_conf.txmode.offloads; |
| 1656 | txq->csum = !!(offloads & |
| 1657 | (RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | |
| 1658 | RTE_ETH_TX_OFFLOAD_UDP_CKSUM | |
| 1659 | RTE_ETH_TX_OFFLOAD_TCP_CKSUM)); |
| 1660 | |
| 1661 | ret = tap_setup_queue(dev, internals, tx_queue_id, 0); |
| 1662 | if (ret == -1) |
| 1663 | return -1; |
| 1664 | TAP_LOG(DEBUG, |
| 1665 | " TX TUNTAP device name %s, qid %d on fd %d csum %s", |
| 1666 | internals->name, tx_queue_id, |
| 1667 | process_private->txq_fds[tx_queue_id], |
| 1668 | txq->csum ? "on" : "off"); |
| 1669 | |
| 1670 | return 0; |
| 1671 | } |
| 1672 | |
| 1673 | static int |
| 1674 | tap_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) |
nothing calls this directly
no test coverage detected