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

Function txgbevf_dev_tx_init

dpdk/drivers/net/txgbe/txgbe_rxtx.c:4953–4978  ·  view source on GitHub ↗

* [VF] Initializes Transmit Unit. */

Source from the content-addressed store, hash-verified

4951 * [VF] Initializes Transmit Unit.
4952 */
4953void __rte_cold
4954txgbevf_dev_tx_init(struct rte_eth_dev *dev)
4955{
4956 struct txgbe_hw *hw;
4957 struct txgbe_tx_queue *txq;
4958 uint64_t bus_addr;
4959 uint16_t i;
4960
4961 PMD_INIT_FUNC_TRACE();
4962 hw = TXGBE_DEV_HW(dev);
4963
4964 /* Setup the Base and Length of the Tx Descriptor Rings */
4965 for (i = 0; i < dev->data->nb_tx_queues; i++) {
4966 txq = dev->data->tx_queues[i];
4967 bus_addr = txq->tx_ring_phys_addr;
4968 wr32(hw, TXGBE_TXBAL(i),
4969 (uint32_t)(bus_addr & BIT_MASK32));
4970 wr32(hw, TXGBE_TXBAH(i),
4971 (uint32_t)(bus_addr >> 32));
4972 wr32m(hw, TXGBE_TXCFG(i), TXGBE_TXCFG_BUFLEN_MASK,
4973 TXGBE_TXCFG_BUFLEN(txq->nb_tx_desc));
4974 /* Setup the HW Tx Head and TX Tail descriptor pointers */
4975 wr32(hw, TXGBE_TXRP(i), 0);
4976 wr32(hw, TXGBE_TXWP(i), 0);
4977 }
4978}
4979
4980/*
4981 * [VF] Start Transmit and Receive Units.

Callers 1

txgbevf_dev_startFunction · 0.85

Calls 2

wr32Function · 0.50
wr32mFunction · 0.50

Tested by

no test coverage detected