From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81147A0A0C; Fri, 2 Jul 2021 18:55:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0ECB241363; Fri, 2 Jul 2021 18:55:40 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 9228641353 for ; Fri, 2 Jul 2021 18:55:38 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 338A57F504; Fri, 2 Jul 2021 19:55:38 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 338A57F504 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1625244938; bh=nGAJQJ0jkxD2yGzAUW8RsFZI73qSIED798UHffWo3uw=; h=Subject:To:References:From:Date:In-Reply-To; b=DxqALCdFv/lBAxPgkX3sVjygzCroYnwyb++4UFOzpcl2MJsKfrMx3JwqhvVIyKNEm /ran8zOcH6jqaN0ZI4S+82WPjRrGltf9jyMbGpOqQ1bGv+HP6u/1d1KmyXkeRuolnK ldy17LBqnEWgEzixVv3QPlphqD63FpdRJcNbZoUI= To: Jiawen Wu , dev@dpdk.org References: <20210617110005.4132926-1-jiawenwu@trustnetic.com> <20210617110005.4132926-18-jiawenwu@trustnetic.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <1338c08c-eab0-b223-574f-74e79c5a165a@oktetlabs.ru> Date: Fri, 2 Jul 2021 19:55:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210617110005.4132926-18-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 17/19] net/ngbe: add Tx queue start and stop X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 [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]