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 3B526A0C50; Wed, 7 Jul 2021 16:00:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 261D5413B6; Wed, 7 Jul 2021 16:00:26 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id F0C6E413A8 for ; Wed, 7 Jul 2021 16:00:24 +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 833FA7F523; Wed, 7 Jul 2021 17:00:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 833FA7F523 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1625666424; bh=azK6cRd4NYAkEUFaKOOShvACsAo6/mm0Sf9Ajji5Ajs=; h=Subject:To:References:From:Date:In-Reply-To; b=oLBR+2GEqXtlienRtiGoeqPfawloAx0WXpdUsvoklX5AjzlEuFWTD6Ci5JEotrnd6 HjXtmCE22wsgM3mddUuV0J0F3N/35jA3UCaNfUSnLbqJLFChkZb91TEb+tx5WDDKpP Hl9kAkUNHMpqjhwMfnpdPldB3AP+C6Ft9w8WFL6w= To: Jiawen Wu , dev@dpdk.org References: <20210706095545.10776-1-jiawenwu@trustnetic.com> <20210706095545.10776-14-jiawenwu@trustnetic.com> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: Date: Wed, 7 Jul 2021 17:00:24 +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: <20210706095545.10776-14-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v7 13/19] net/ngbe: add Tx queue setup and release 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 7/6/21 12:55 PM, Jiawen Wu wrote: > Setup device Tx queue and release Tx queue. > > Signed-off-by: Jiawen Wu Same here, format string should be on the next its own line: ### net/ngbe: add Tx queue setup and release CHECK:CAMELCASE: Avoid CamelCase: #299: FILE: drivers/net/ngbe/ngbe_rxtx.c:202: + PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%" PRIx64, total: 0 errors, 0 warnings, 1 checks, 398 lines checked [snip] > + > +/** > + * Structure associated with each Tx queue. > + */ > +struct ngbe_tx_queue { > + /** Tx ring virtual address. */ > + volatile struct ngbe_tx_desc *tx_ring; > + uint64_t tx_ring_phys_addr; /**< Tx ring DMA address. */ > + struct ngbe_tx_entry *sw_ring; /**< address of SW ring for scalar PMD.*/ > + volatile uint32_t *tdt_reg_addr; /**< Address of TDT register. */ > + volatile uint32_t *tdc_reg_addr; /**< Address of TDC register. */ > + uint16_t nb_tx_desc; /**< number of Tx descriptors. */ > + uint16_t tx_tail; /**< current value of TDT reg. */ > + /**< Start freeing Tx buffers if there are less free descriptors than > + * this value. > + */ Comment should start from /** Also multi-line comment should be: /** * Comment here */ > + uint16_t tx_free_thresh; > + /** Index to last Tx descriptor to have been cleaned. */ > + uint16_t last_desc_cleaned; > + /** Total number of Tx descriptors ready to be allocated. */ > + uint16_t nb_tx_free; > + uint16_t tx_next_dd; /**< next desc to scan for DD bit */ > + uint16_t queue_id; /**< Tx queue index. */ > + uint16_t reg_idx; /**< Tx queue register index. */ > + uint16_t port_id; /**< Device port identifier. */ > + uint8_t pthresh; /**< Prefetch threshold register. */ > + uint8_t hthresh; /**< Host threshold register. */ > + uint8_t wthresh; /**< Write-back threshold reg. */ > + uint32_t ctx_curr; /**< Hardware context states. */ > + /** Hardware context0 history. */ > + struct ngbe_ctx_info ctx_cache[NGBE_CTX_NUM]; > + const struct ngbe_txq_ops *ops; /**< txq ops */ > + uint8_t tx_deferred_start; /**< not in global dev start. */ > +}; Some of comments above have full stop, some do not have. Be consistent. I'd simply remove full stop everywhere to make lines a bit shorter. [snip]