From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PKTGEN] OK to reindent the pktgen (mix of tabs and spaces, etc.)? Date: Sun, 3 Jan 2016 15:06:09 -0800 Message-ID: <20160103150609.0cfd0787@xeon-e3> References: <674FEFDF-70BD-4C02-947B-10C9F9FC862C@intel.com> <56899BA7.60006@mhcomputing.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Matthew Hall Return-path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id DC2BD5A24 for ; Mon, 4 Jan 2016 00:06:00 +0100 (CET) Received: by mail-pf0-f174.google.com with SMTP id 65so147219865pff.3 for ; Sun, 03 Jan 2016 15:06:00 -0800 (PST) In-Reply-To: <56899BA7.60006@mhcomputing.net> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, 3 Jan 2016 14:07:35 -0800 Matthew Hall wrote: > On 1/3/16 9:09 AM, Wiles, Keith wrote: > > Pktgen is setup for tabs for 4 (with replace tabs with spaces), using tab stop of 8 is just wrong IMO :-) > > Just started using kdevelop instead of eclipse, so I may have corrupted the style some :-( > > The problem I found was a number of files had an incompatible > combination of the two formats. > > Personally, I agree tab size 4 w/ spaces instead of tabs is easiest to > read and edit. But I could live with any space based system for the most > part. I find tab based systems are unpleasant because it is difficult > when tabs are used for one thing and spaces for another thing. This > annoyance also applies to DPDK and the kernel but it's too late for both > of those. > > > At least it is suppose to be done that way. I will reformat the code (with tabs=4) and have a look at the output. > > Thanks this will be a big help. > > > I can run the astyle on the code and look at the output, if it looks OK I will submit it to the repo > > Sounds great... it is no big hurry on my end but I want to start with a > clean slate before I get invested in the code, and start really hitting > it hard, and making patches. > > The formatting command I provided is not perfect, but it was the best I > could do with the various popular indenter tools to try to avoid messing > up too much of the rest of the good code in the files in the process of > fixing the format. > > You might be able to improve it a bit further w/ some additional > experimentation since you are the original maintainer of the code > obviously. Or perhaps reformat using tools in Eclipse or KDevelop? I had > good luck w/ Eclipse before with special configuration but I only mostly > used the Java mode not the C / C++ one which is less good. > > Matthew. Since DPDK mostly follows kernel style, why should this program be different?