[dpdk-dev] New driver (large patch) question.

Bruce Richardson bruce.richardson at intel.com
Thu Mar 3 00:43:28 CET 2016


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



More information about the dev mailing list