From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 2EEA37EE3
 for <dev@dpdk.org>; Mon, 17 Sep 2018 14:51:13 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id BA44320A41;
 Mon, 17 Sep 2018 08:51:12 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Mon, 17 Sep 2018 08:51:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=mesmtp; bh=6mbLckUrO726qehtI8jScqDg1Q
 qDGkhZm01w/S5eiU4=; b=cyoacYWrcynm2YD5sJFtQPEGIE2X85/jtEIgWMy8XR
 tqtGgw9y88H5B2iAMMk1B4AZbqquanCTLl2L7tZOTjNo4KB9Kka2ryX3ZFaIvHLH
 4K3dwecsx6WBwGDgDOSOqfr3DJdVmSJl9yq1QOsYO9gC9ww8CUjabsn9IiEFyMJf
 A=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6mbLck
 UrO726qehtI8jScqDg1QqDGkhZm01w/S5eiU4=; b=COP9y9mJgh/DVB2fRoCqQU
 KZe3xpXtXRV9V5Lb2IvrFxfhJYq34UKH6ZB6tkXiowFioWukrcRP9/JHY42G20m8
 QYXOHkMeUUcVUFQaAgFo2wq3c/ePpJpZM3vjrcBvzact3MeYj6Sswd+hSC4Dod6y
 /t0H/eUosfm0Gr+WHsESJYhzjcyJq5PG7SfU+VMoCC21xUyAqcqkY6UyThxhNQbR
 UM6qBPh5D1S+VxTAVe72achw2vsU4cXq24uHuRylTB7mRmMTwlrEpqDwysjubzIj
 x0SA4PIXDjXMM2lcc/9f5d/qZb4/QXqNk8UUkkrNfiOfAstgghX1ezw3oaDab3kg
 ==
X-ME-Proxy: <xmx:QKOfW-V_emPB_FK2Cb2YmwYki6G_ihFW5bfh69rqzHtRLfnI9tdUhQ>
 <xmx:QKOfW1Wo5TCCKJQkc-TAeuBOlnm0mqhn2cSf61RudxemQp49QP6zqw>
 <xmx:QKOfW7v0lZf_xRmOxAJyPwXoe15Gwv6a7zH0g5nbGHqwn3hM-l62gg>
 <xmx:QKOfW0GGeAXgCrGCiBYl4z8XgJHBuX0c8utBKn1xdvN9wjr10ve7vA>
 <xmx:QKOfW2KeNg8k2kztARTr0tlRZaHgDRxmdyTT5Xv07FbF1HFKJcVOvA>
 <xmx:QKOfW2hlZpJ0eHJeo4RmFOu3Yeqt8mLrWdwokIXaJLMzW8A3V93lSA>
X-ME-Sender: <xms:QKOfW7qXZIvv0YUwiIqL6GlJMDWGesy6mPVBAm7_e0qtp5mW-VLelA>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id A5036E47C2;
 Mon, 17 Sep 2018 08:51:10 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Akhil Goyal <akhil.goyal@nxp.com>,
 Anoob Joseph <ajoseph@caviumnetworks.com>
Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>,
 Anoob Joseph <anoob.joseph@caviumnetworks.com>,
 Jerin Jacob <jerin.jacob@caviumnetworks.com>,
 Narayana Prasad <narayanaprasad.athreya@caviumnetworks.com>, dev@dpdk.org,
 Ankur Dwivedi <ankur.dwivedi@caviumnetworks.com>,
 Murthy NSSR <nidadavolu.murthy@caviumnetworks.com>,
 Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>,
 Ragothaman Jayaraman <rjayaraman@caviumnetworks.com>,
 Srisivasubramanian S <ssrinivasan@caviumnetworks.com>,
 Tejasree Kondoj <kondoj.tejasree@caviumnetworks.com>, ferruh.yigit@intel.com,
 john.mcnamara@intel.com
Date: Mon, 17 Sep 2018 14:51:09 +0200
Message-ID: <7843615.4ScgYAuD0v@xps>
In-Reply-To: <7325a516-0f5b-1993-efd9-1a203346b137@nxp.com>
References: <1528476325-15585-1-git-send-email-anoob.joseph@caviumnetworks.com>
 <1686325.VlSG2WtMdx@xps> <7325a516-0f5b-1993-efd9-1a203346b137@nxp.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v2 05/33] common/cpt: add common code for
	init routine
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Sep 2018 12:51:13 -0000

17/09/2018 14:32, Akhil Goyal:
> 
> Hi Thomas,
> 
> On 9/17/2018 5:16 PM, Thomas Monjalon wrote:
> 
> > 17/09/2018 12:45, Akhil Goyal:
> >> On 9/4/2018 9:28 AM, Anoob Joseph wrote:
> >>> +struct pending_queue {
> >>> +	uint16_t enq_tail;
> >>> +	uint16_t deq_head;
> >>> +	uint16_t soft_qlen;
> >>> +		/**< Software expected queue length */
> >>> +	uint16_t p_doorbell;
> >>> +	struct rid *rid_queue;
> >>> +		/**< Array of pending requests */
> >>> +	uint64_t pending_count;
> >>> +		/**< Pending requests count */
> >>> +};
> >> better to add comment for each element of structure.
> >> Also remove extra tab for comments(here and any other place if any.)
> > I don't understand this trend in the community about doing comments
> > _after_ the item _and_ not on the same line.
> > The default style should be commenting _before_.
> > And if you feel it is better to have the comment on the same line,
> > then you can comment _after_, but on the same line.
> >
> I think this should not matter, whether the comment should be before or after,
> 
> it should be consistent across the code. I can see that both are being used equally.
> 
> Shall we change the complete code beyond this driver as well?
> 
> I think whatever we choose, it should be atleast consistent within the file.

Let me rephrase.

There are 3 styles:
	1/ comment on the previous line (before the item)
	2/ comment on the same line (just after the item)
	3/ comment on the next line (after the item)

I am fine with #1 and #2 but I really don't see the benefit of #3.