From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bruce.richardson@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id D462F2986
 for <dev@dpdk.org>; Thu,  3 Mar 2016 00:43:31 +0100 (CET)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga101.jf.intel.com with ESMTP; 02 Mar 2016 15:43:31 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.22,531,1449561600"; d="scan'208";a="899829469"
Received: from bricha3-mobl3.ger.corp.intel.com ([10.122.40.66])
 by orsmga001.jf.intel.com with SMTP; 02 Mar 2016 15:43:28 -0800
Received: by  (sSMTP sendmail emulation); Wed, 02 Mar 2016 23:43:28 +0025
Date: Wed, 2 Mar 2016 23:43:28 +0000
From: Bruce Richardson <bruce.richardson@intel.com>
To: Vincent JARDIN <vincent.jardin@6wind.com>
Message-ID: <20160302234327.GC10724@bricha3-MOBL3>
References: <CAJ9nmBaWh8WsuzQcAfrebjaFNYSGsGxEd5Y5DQfWTPuxYY8XWQ@mail.gmail.com>
 <2110917.95LWFiBeeK@xps13> <20160302082450.6f64cf8e@xeon-e3>
 <CAJ9nmBY-9z7o94cqHwKoS+ThWxZSvvpCrsJzBcduf0thVjNzAA@mail.gmail.com>
 <56D77229.1080100@6wind.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <56D77229.1080100@6wind.com>
Organization: Intel Shannon Ltd.
User-Agent: Mutt/1.5.23 (2014-03-12)
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] New driver (large patch) question.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Mar 2016 23:43:32 -0000

On Thu, Mar 03, 2016 at 12:07:21AM +0100, Vincent JARDIN wrote:
> Please,
> 
> Le 02/03/2016 22:30, Stephen Hurd a écrit :
> >Too many of the DPDK drivers are bloated.
> >>Recall the venerable paraphrase of Pascal, "I made this so long because I
> >>did not have time to make it shorter."
> >>https://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn%27t_read
> 
> Keep In Simple, Small Is Beautiful, the big drivers with dead codes are not
> easy to be maintained. We have lot of duplication of efforts between the
> kernel and some DPDK PMDs,
> 
> Currently, the breakdown of Lines of Codes of the PMDs are:
> 
> 492 ring
> 522 null
> 666 af_packet
> 829 pcap
> 1229 szedata2
> 1300 mpipe
> 1411 xenvirt
> 2036 nfp
> 2260 vmxnet3
> 3074 virtio
> 4129 mlx4
> 4205 bonding
> 4524 mlx5
> 4904 enic
> 7654 cxgbe
> 7969 fm10k
> 27862 ixgbe
> 29209 e1000
> 31392 i40e
> 38031 bnx2x
> 
> (I did use cloc).
> 
> Vincent

Hi Vincent,

I think most of us would wholehearted agree with the "small is beautiful"
sentiment.

However, I disagree with the assumption that these counts reflect the maintenance
burden of these drivers. The Intel drivers, as do some others, use a "base code"
model, where there is a set of code shared between various platforms. This code
should not be included in the maintenance calculation since it is explicitly not
being maintained by the DPDK project itself. A better metric of the overhead of
the various drivers would be the LOC count excluding any base code.

Now, if you are considering the code size for compilation time, or release package
sizing - then it's a fair metric! :-)

Regards,
/Bruce