From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 2/2] mk: reduce scope of whole-archive to pmd libraries Date: Fri, 10 Jun 2016 10:57:08 +0100 Message-ID: <575A8EF4.3080002@intel.com> References: <574872B3.6040702@intel.com> <1464367686-3475-1-git-send-email-ferruh.yigit@intel.com> <1464367686-3475-2-git-send-email-ferruh.yigit@intel.com> <4324849.ehO8V5db18@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, Panu Matilainen , Christian Ehrhardt , olivier.matz@6wind.com To: Thomas Monjalon Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DC57C2BA6 for ; Fri, 10 Jun 2016 11:57:11 +0200 (CEST) In-Reply-To: <4324849.ehO8V5db18@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/10/2016 10:03 AM, Thomas Monjalon wrote: > 2016-05-27 17:48, Ferruh Yigit: >> --whole-archive argument only required for pmd libraries, and currentl= y >> it covers more libraries. Reducing scope of the argument to pmd >> libraries slightly reduce final application size. >=20 > In my understanding, --whole-archive is required for static libraries u= sed > by plugins: > http://dpdk.org/commit/20afd76a Right, required for static libraries. But more than used by plugins, required for plugin to work. >=20 > If we want to restrict it, I would say it must be around EAL, ring, > mbuf, mempool, ethdev, cryptodev, etc. >=20 We should restrict to plugins. What happens is, since there is no direct call to PMDs from application, PMD code is not included into final application. To force PMDs to be included into final binary, --whole-archive is required. But --whole-archive is not required for other libraries, and just cause unnecessary increase in binary size. Sample logs, with same setup, [1] compiled without --whole-archive, [2] is current code: [1]: # ./testpmd -- -i EAL: Detected 32 lcore(s) EAL: Probing VFIO support... EAL: No probed ethernet devices Interactive-mode selected USER1: create a new mbuf pool : n=3D395456, size=3D21= 76, socket=3D0 Done testpmd> show port info all testpmd> quit [2] # ./testpmd -- -i EAL: Detected 32 lcore(s) EAL: Probing VFIO support... EAL: PCI device 0000:04:00.0 on NUMA socket 0 EAL: probe driver: 8086:1521 rte_igb_pmd EAL: PCI device 0000:08:00.0 on NUMA socket 0 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:08:00.1 on NUMA socket 0 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:0a:00.0 on NUMA socket 0 EAL: probe driver: 8086:1584 rte_i40e_pmd EAL: PCI device 0000:81:00.0 on NUMA socket 1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:81:00.1 on NUMA socket 1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 8086:15a4 rte_pmd_fm10k EAL: PCI device 0000:87:00.0 on NUMA socket 1 EAL: probe driver: 8086:15a4 rte_pmd_fm10k EAL: PCI device 0000:88:00.0 on NUMA socket 1 EAL: probe driver: 8086:1572 rte_i40e_pmd EAL: PCI device 0000:88:00.1 on NUMA socket 1 EAL: probe driver: 8086:1572 rte_i40e_pmd EAL: PCI device 0000:88:00.2 on NUMA socket 1 EAL: probe driver: 8086:1572 rte_i40e_pmd EAL: PCI device 0000:88:00.3 on NUMA socket 1 EAL: probe driver: 8086:1572 rte_i40e_pmd Interactive-mode selected USER1: create a new mbuf pool : n=3D395456, size=3D21= 76, socket=3D0 Configuring Port 0 (socket 0) Port 0: 90:E2:BA:0E:49:B9 Configuring Port 1 (socket 0) Port 1: 00:1B:21:76:FA:21 Checking link statuses... Port 0 Link Up - speed 10000 Mbps - full-duplex Port 1 Link Up - speed 10000 Mbps - full-duplex Done testpmd>