DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Nikita Kozlov <nikita@elyzion.net>,
	Thomas Monjalon <thomas.monjalon@6wind.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH v2 0/5] change lpm route table from code to data
Date: Thu, 14 Jul 2016 17:06:17 +0100	[thread overview]
Message-ID: <1468512382-30412-1-git-send-email-bruce.richardson@intel.com> (raw)
In-Reply-To: <1465909410-4668-1-git-send-email-nikita@elyzion.net>

This patchset takes the existing lpm large routing table information and
converts it from a header file included at compile time to a resource linked
in. This improves things in two ways:
1. Improves DPDK build time
2. Removes approx 1 million lines of code from our LOC counts, as the header
   file no longer counts as code, but more correctly as data.

Before and after approx code stats (with some additional patchsets applied)
are given below.  Notice how the app folder has dropped from being the biggest
component with 6x the drivers code to second place with less code than the
drivers.

Future work is to repeat the same process for lpm6. Additional work for both
lpm and lpm6 is to remove the routing tables entirely and replace them with
auto-generated data that gives the roughly the same results. That would
shrink the overall size of DPDK releases, and is the desired end state.

---

This patchset is based directly on the original RFC submitted:
http://www.dpdk.org/ml/archives/dev/2016-May/038478.html.

Updates in this version compared to RFC:
* rebased on dpdk.org HEAD. The changes are now mostly to test_lpm_perf.c
  rather than test_lpm.c
* removed use of strndupa() as suggest by Nikita Koslov

---

## Before:

SLOC    Directory       SLOC-by-Language (Sorted)
1237464 app             ansic=1236324,python=1140
192107  drivers         ansic=192107
108109  lib             ansic=107968,python=141
65447   examples        ansic=65312,sh=135
849     tools           python=444,sh=405
799     scripts         sh=799
77      doc             python=75,sh=2
0       config          (none)
0       mk              (none)
0       pkg             (none)
0       top_dir         (none)


Totals grouped by language (dominant language first):
ansic:      1601711 (99.80%)
python:        1800 (0.11%)
sh:            1341 (0.08%)

-----------

## After

SLOC    Directory       SLOC-by-Language (Sorted)
192107  drivers         ansic=192107
160646  app             ansic=159506,python=1140
108109  lib             ansic=107968,python=141
65447   examples        ansic=65312,sh=135
849     tools           python=444,sh=405
799     scripts         sh=799
77      doc             python=75,sh=2
0       config          (none)
0       mk              (none)
0       pkg             (none)
0       top_dir         (none)


Totals grouped by language (dominant language first):
ansic:       524893 (99.41%)
python:        1800 (0.34%)
sh:            1341 (0.25%)

generated using David A. Wheeler's 'SLOCCount'

Bruce Richardson (5):
  test: fix unneeded routes table include from lpm test
  test: make all lpm routes be of unsigned type
  test: add lpm routes as a linked resource
  test: change lpm test to use routes as resource
  test: change lpm routes file from header to data file

 app/test/Makefile                                  |  1 +
 app/test/test_lpm.c                                |  2 +-
 app/test/test_lpm_perf.c                           | 78 +++++++++++++++++++++-
 .../{test_lpm_routes.h => test_lpm_routes.dat}     |  2 +-
 4 files changed, 80 insertions(+), 3 deletions(-)
 rename app/test/{test_lpm_routes.h => test_lpm_routes.dat} (99%)

-- 
2.5.5

  parent reply	other threads:[~2016-07-14 16:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 12:51 [dpdk-dev] [RFC PATCH 0/4] Convert lpm data from header to resource Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 1/4] test: add lpm routes as a linked resource Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 2/4] test: make all lpm routes be of unsigned type Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 3/4] test: change lpm test to use routes as resource Bruce Richardson
2016-05-06 13:02   ` Bruce Richardson
2016-05-06 12:51 ` [dpdk-dev] [RFC PATCH 4/4] test: change lpm routes file from header to data file Bruce Richardson
2016-05-06 13:20 ` [dpdk-dev] [RFC PATCH 0/4] Convert lpm data from header to resource Thomas Monjalon
2016-06-14 13:03 ` [dpdk-dev] [PATCH " Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 1/4] test: make all lpm routes be of unsigned type Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 2/4] test: change lpm routes file from header to data file Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 3/4] test: change lpm test to use routes as resource Nikita Kozlov
2016-06-14 13:03   ` [dpdk-dev] [PATCH 4/4] test: change lpm perf " Nikita Kozlov
2016-06-14 14:25   ` [dpdk-dev] [PATCH 0/4] Convert lpm data from header to resource Thomas Monjalon
2016-07-14 16:06   ` Bruce Richardson [this message]
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 1/5] test: fix unneeded routes table include from lpm test Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 2/5] test: make all lpm routes be of unsigned type Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 3/5] test: add lpm routes as a linked resource Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 4/5] test: change lpm test to use routes as resource Bruce Richardson
2016-07-14 16:06     ` [dpdk-dev] [PATCH v2 5/5] test: change lpm routes file from header to data file Bruce Richardson
2016-07-15 23:05       ` Thomas Monjalon
2016-07-16  9:46         ` Richardson, Bruce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468512382-30412-1-git-send-email-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=nikita@elyzion.net \
    --cc=thomas.monjalon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).