From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2AD255A52 for ; Wed, 8 Apr 2015 14:16:16 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 08 Apr 2015 05:16:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,544,1422950400"; d="scan'208";a="478292146" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by FMSMGA003.fm.intel.com with ESMTP; 08 Apr 2015 05:16:12 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.95]) by irsmsx110.ger.corp.intel.com ([169.254.15.83]) with mapi id 14.03.0224.002; Wed, 8 Apr 2015 13:16:10 +0100 From: "Butler, Siobhan A" To: Neil Horman Thread-Topic: [dpdk-dev] tools brainstorming Thread-Index: AQHQYx105wa2dYsDE0GLqygeszi7351DCqJggAAA4wCAABdqUA== Date: Wed, 8 Apr 2015 12:16:10 +0000 Message-ID: <0C5AFCA4B3408848ADF2A3073F7D8CC86D58FB64@IRSMSX109.ger.corp.intel.com> References: <3571725.20GtF5MAnU@xps13> <0C5AFCA4B3408848ADF2A3073F7D8CC86D58F9C2@IRSMSX109.ger.corp.intel.com> <20150408114339.GA22959@hmsreliant.think-freely.org> In-Reply-To: <20150408114339.GA22959@hmsreliant.think-freely.org> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] tools brainstorming X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 12:16:17 -0000 > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Wednesday, April 8, 2015 12:44 PM > To: Butler, Siobhan A > Cc: Thomas Monjalon; dev@dpdk.org > Subject: Re: [dpdk-dev] tools brainstorming >=20 > On Wed, Apr 08, 2015 at 10:43:53AM +0000, Butler, Siobhan A wrote: > > Hi all, > > To add to the tools brainstorming - I propose we use the following Codi= ng > Standards as the basis of guidelines on coding style going forward. > > The style outlined below is in alignment with the current convention us= ed > for the majority of the project. > > Any thoughts/suggestions or feedback welcome. > > Thanks > > Siobhan :) > > > > > > > > > > Coding Style > > ~~~~~~~~~~ > > > > Description > > ----------- > > > > This document specifies the preferred style for source files in the DPD= K > source tree. > > It is based on the Linux Kernel coding guidelines and the FreeBSD 7.2 > > Kernel Developer's Manual (see man style(9)), but was heavily modified = for > the needs of the DPDK. Many of the style rules are implicit in the exampl= es. > > Be careful to check the examples before assuming that style is silent o= n an > issue. > > > > General Guidelines > > ------------------ > > > > The rules and guidelines given in this document cannot cover every > situation, so the following general guidelines should be used as a fallba= ck: > > The code style should be consistent within each individual file, and > > within each file in a given directory or module - in the case of creati= ng new > files The primary reason for coding standards is to increase code readabi= lity > and comprehensibility, therefore always use whatever option will make the > code easiest to read. > > > > The following more specific recommendations apply to all sections, both= for > C and assembly code: > > Line length is recommended to be not more than 80 characters, > > including comments. [Tab stop size should be assumed to be at least 4- > characters wide] Indentation should be to no more than 3 levels deep. > > NOTE The above are recommendations, and not hard limits. However, it is > expected that the recommendations should be followed in all but the rares= t > situations. > > C Comment Style > > > > Usual Comments > > -------------- > > > > These comments should be used in normal cases. To document a public > API, a doxygen-like format must be used: refer to Doxygen Documentation. > > /* > > * VERY important single-line comments look like this. > > */ > > > > /* Most single-line comments look like this. */ > > > > /* > > * Multi-line comments look like this. Make them real sentences. Fill > > * them so they look like real paragraphs. > > */ > > > > License Header > > -------------- > > > > Each file should begin with a special comment tag which will contain th= e > appropriate copyright and license for the file (Generally BSD License). > > After any copyright header, a blank line should be left before any othe= r > contents, e.g. include statements in a C file. > > >=20 > This can become very confusing. There already is a LICENSE.GPL and > LICENSE.LGPL file at the top of the project, allowing others to insert th= eir > own licenses within their files can make it difficult for end user to det= ermine > if it is legally safe to use a given project. >=20 > I'd suggest instead that contributions be disallowed from including licen= se > files in their code, relying instead on only a single license at the top = of the > project (which should likely be BSD or LGPL, since we're shipping a libra= ry). >=20 > IANAL, but it seems to me to be dangerous to do anything else. For > example, all the code that is dual licensed in the library (like > rte_pci_dev_ids.h). It allows for a BSD or GPL license. If someone buil= ds > dpdk as a DSO and distributes it under the former, every application that= links > against that re-distribution may arguably itself become GPL licensed. Wh= ile > I'm personally fine with that, I can see it as being a big deal to some e= nd > users. Unifying the license makes the re-distribution license issue more= clear > for everyone. >=20 > Neil Input appreciated Neil thank you, would it be best to include this in one o= f the community conference calls? IANAL either ( yet at least :) ) - we can certainly consult with someone wh= o has the expertise. If others are interested in discussing this we can get added to the agenda = for an upcoming call. Is more detailed explanation/notice on the licensing structure required? Thanks, Siobhan=20