From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 36DA134F0 for ; Sat, 31 Mar 2018 17:33:22 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id f125so20681911wme.4 for ; Sat, 31 Mar 2018 08:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=CUUeHjpm3stOmP8gWaHTHt4J97ORAAiwhMmCyzuZtEI=; b=HOvtw40HzOt9QxhNmyWZCa+ZwexS7zk2p8yIoKRTh+vfC71FRHCHTvzoSsem7Ml4ah Fo0v3m4p/6/qJ8bxcQhbPTG7FC+BR1mf4MCKTfU56Z/9okBEwkXK7b8uOnL4DsqYW2ol 1Wv1wLBQ7rnAcfqfirGKskOQVJQwCkwmzX5KYer85oOJTY+0ADMALpzl0PIaCdNL7w3x andMnumTJSKVnGFnm3PXW7Pwsq9Y/RWWwMQ5BG9aAnBsqOdTyQXWO+uhO/TDE4vvbjfO u+vhzYIgzPNNfqsVOHhE6kRhoStyR39n3rqfhMtQlsJ4rvczi/wyvwCI+M5+zRukGKfr 5WEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=CUUeHjpm3stOmP8gWaHTHt4J97ORAAiwhMmCyzuZtEI=; b=KgjpaKXBNKrkYTYJBN+66veCxA5HUCZ2wXL30OVget2cCiax0uCDhxBe6zMvkaNSV9 8O61Kx4V6P6hviAX9nLVDAyxxXq5vIO3r3/URxy/VpsazK1QDu1Hi4s224WLm++2PyNG mrPAw0iLZbcb2YV0jLHuHu5ovvh72jBBS2wSi4uG2YfEkzYV/7TcH4y+SADtJ2JxgZyM 002cb007eu4RTE1lIaX+NOERb6IjYBSM6ofnojfVEoX4TGQMJkgwYucwANAlHbJVu0Ha eiIGuaY5CnxeV80X9azy4uPxWuidWClGHuw2j05FUvy5+8G0bR+DJjtjKsxS8ueGeyZt 6WPQ== X-Gm-Message-State: ALQs6tAoq9l8P2D4UWw9aTdWHrbxEfDfL0yloR0Hi4jTeAacfCHWh4KC wB77GTtNdmtG6RfKWOKbtXmrRrnz X-Google-Smtp-Source: AIpwx4/IG2cEK69ABhiUujnjOGndttZQ/mYq225Gm2T1uEzp4VTtmjTArw8i5PDH6/gN4249I8ZW9w== X-Received: by 10.28.150.210 with SMTP id y201mr5308212wmd.112.1522510401807; Sat, 31 Mar 2018 08:33:21 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b40sm27688249wrb.88.2018.03.31.08.33.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 31 Mar 2018 08:33:20 -0700 (PDT) Date: Sat, 31 Mar 2018 17:33:07 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: "Wiles, Keith" Cc: "dev@dpdk.org" Message-ID: <20180331153307.2autdhdfggkzv43u@bidouze.vm.6wind.com> References: <20180330155335.3tnaczturi6gvnzl@bidouze.vm.6wind.com> <5BF83C02-5266-4F6F-9A99-065FC92CB8CC@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5BF83C02-5266-4F6F-9A99-065FC92CB8CC@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v4 09/20] eal/dev: implement device iteration initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2018 15:33:22 -0000 On Fri, Mar 30, 2018 at 04:22:15PM +0000, Wiles, Keith wrote: > > > > On Mar 30, 2018, at 10:53 AM, Gaëtan Rivet wrote: > > > > Hello Keith, > > Hello Gaëtan, > > >>> + layers[i].kvlist = rte_kvargs_parse(copy, NULL); > >>> + free(copy); > >> > >> I am sorry this method of not adding blank lines is a bit silly and we need to rethink at least adding a few blank lines to help with grouping the code. This style will cause problems for new readers (old readers) to understand the code. This to me is a maintenance problem for the future and we need to fix this now. > >> > >> Blank lines after if statements (with possible more comments) can help along with adding blank lines to group code is really the minimum amount of lines required. I have never seen someone state you have to many blanks lines in the code except two or more blank lines in a row. This is akin to having a single paragraph in a novel or letter and it makes it very hard to read. It is not hard to add some blank lines to the code for readability. > >> > > > > I understand. What I dislike is having inconsistencies in the layout of > > the code. > > > > "Paragraphs", for lack of a better word, are high subjective and a > > matter of taste. > > I bet your teacher(s) would disagree with that statement with one single paragraph in your book reports :-) The utility of using paragraph is not a matter of subjectivity. How to use them and how to structure information is what I deemed subjective. > > > > Given that subjectivity is not helpful in review and taste is hard to > > debate, I prefer to have a single terse rule, that is to avoid any > > additional bytes beside the bare minimum to respect checkpatch. > > Taste is hard to debate, but you have gone the extreme route with only the bare minimum blank lines and that is not good as well. A silly script does not read code or understand code we the humans have to make the code readable. > > > > When I feel the need to have a new "conceptual group", then I am forced > > to add a comment to explain what is happening. By not allowing blank > > lines, I thus feel the pressure for space and explanation more acutely. > > A blank can give somewhat convey the same information without a comment, but not in all cases. Even a blank before a group of lines can convey this is a new logic section. I do not buy the point for needing the same terse rule here as most of the coding style is free form and allows for reading between the lines a bit. > > We can make a rule here, but no blank lines in a function this size and the patch of this size is making DPDK not as professional looking as it could be. > I think one of the main issue anyway is that this function is simply too large as it is. As it turns out, I am working on the second side of this work, which is revamping the device declaration path. This function will be split in different parts, that will be shorter and more palatable. This is a big work, still in progress (the device declaration, not the split of this function). -- Gaëtan Rivet 6WIND