From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A9D0737A4 for ; Thu, 14 Jul 2016 18:06:41 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 14 Jul 2016 09:06:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,363,1464678000"; d="scan'208";a="1006880043" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 14 Jul 2016 09:06:39 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u6EG6cJE024100; Thu, 14 Jul 2016 17:06:38 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u6EG6c90030762; Thu, 14 Jul 2016 17:06:38 +0100 Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id u6EG6bWb030758; Thu, 14 Jul 2016 17:06:37 +0100 From: Bruce Richardson To: dev@dpdk.org Cc: Nikita Kozlov , Thomas Monjalon , Bruce Richardson Date: Thu, 14 Jul 2016 17:06:17 +0100 Message-Id: <1468512382-30412-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465909410-4668-1-git-send-email-nikita@elyzion.net> References: <1465909410-4668-1-git-send-email-nikita@elyzion.net> Subject: [dpdk-dev] [PATCH v2 0/5] change lpm route table from code to data 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: Thu, 14 Jul 2016 16:06:42 -0000 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