On 6/17/21 2:00 PM, Jiawen Wu wrote:
> Initializes transmit unit, support to start and stop transmit unit for
> specified queues.
> 
> Signed-off-by: Jiawen Wu <jiawe...@trustnetic.com>

[snip]

> diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c
> index d4680afaae..b05cb0ec34 100644
> --- a/drivers/net/ngbe/ngbe_rxtx.c
> +++ b/drivers/net/ngbe/ngbe_rxtx.c

> +/*
> + * Start Transmit Units for specified queue.
> + */
> +int __rte_cold
> +ngbe_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
> +{
> +     struct ngbe_hw *hw = ngbe_dev_hw(dev);
> +     struct ngbe_tx_queue *txq;
> +     uint32_t txdctl;
> +     int poll_ms;
> +
> +     PMD_INIT_FUNC_TRACE();
> +
> +     txq = dev->data->tx_queues[tx_queue_id];
> +     wr32m(hw, NGBE_TXCFG(txq->reg_idx), NGBE_TXCFG_ENA, NGBE_TXCFG_ENA);
> +
> +     /* Wait until Tx Enable ready */
> +     poll_ms = RTE_NGBE_REGISTER_POLL_WAIT_10_MS;
> +     do {
> +             rte_delay_ms(1);
> +             txdctl = rd32(hw, NGBE_TXCFG(txq->reg_idx));
> +     } while (--poll_ms && !(txdctl & NGBE_TXCFG_ENA));
> +     if (poll_ms == 0)
> +             PMD_INIT_LOG(ERR, "Could not enable "
> +                          "Tx Queue %d", tx_queue_id);

Do not split format string

[snip]

Reply via email to