From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 6772D3F9 for ; Wed, 17 Dec 2014 00:37:34 +0100 (CET) Received: by mail-wg0-f50.google.com with SMTP id a1so18695559wgh.23 for ; Tue, 16 Dec 2014 15:37:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ScSsU0ljoq7tSfHhYW2IXOUQWQXaBugK2K4uJjtK41I=; b=B5XrfkzN8govCZ2NGN/j2ciHIz0XrwChe2fMA48hI9tZFLV7W+lHKFZ8iL9JE933QM agHRfXkm6pwr+c9Q24meotGNo705PDA4dJO+HL+n2+J4INPqO4eKtOUjEOzzFAWgq2ZY REq6Ld/fI1JQ0vuPrZMeeW02oAC4X3yQ43ZMHJs3QaApOOwZb/nnh1GLEc0NgcETOd1p BMMbJx/3fEYNahi+T06ktlqRSThT0RJP08+orvS+BigA/a9PHOTf8FqcQJocxmYIEDh/ +gHi6N8GGS70YlnEu+4uMxpZvIpZZ+skhEh3OCBo0/mukpuF07Szj66r9+n0y/ZPaT0N brTw== X-Gm-Message-State: ALoCoQm61tJRcgdS4kkNRfZItLAhAc5JrkLL3XGwxZUtOysOEy5WtUpm8YLVmn21SuUYcplCEkf+ X-Received: by 10.194.23.10 with SMTP id i10mr65009861wjf.11.1418773054251; Tue, 16 Dec 2014 15:37:34 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id nj9sm3920165wic.10.2014.12.16.15.37.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 15:37:33 -0800 (PST) From: Thomas Monjalon To: Neil Horman Date: Wed, 17 Dec 2014 00:37:07 +0100 Message-ID: <9153973.Z7xqOoYtLz@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <20141216214213.GF13806@hmsreliant.think-freely.org> References: <2438199.ui6ep4sFDa@xps13> <78819532.f064i2G3g0@xps13> <20141216214213.GF13806@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] mk: fix build with shared pcap pmd 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: Tue, 16 Dec 2014 23:37:34 -0000 2014-12-16 16:42, Neil Horman: > On Tue, Dec 16, 2014 at 03:39:56PM +0100, Thomas Monjalon wrote: > > 2014-12-16 08:58, Neil Horman: > > > On Tue, Dec 16, 2014 at 12:04:44AM +0100, Thomas Monjalon wrote: > > > > Some applications doesn't have the pcap link flag > > > > when shared libraries are enabled. > > > > Indeed in such case, pcap PMD must not be linked but pcap library should. > > > > > > > > Actually -lpcap is always needed if pcap PMD is used, > > > > and -lrte_pmd_pcap must be set only with static PMD library. > > > > So the flags -lrte_pmd_pcap and -lpcap are enabled separately. > > > > > > > > Workarounds in test-pmd/ and test-pipeline/ can be removed. > > > > > > > > Reported-by: Stepan Sojka > > > > Signed-off-by: Thomas Monjalon > > [...] > > > > --- a/mk/rte.app.mk > > > > +++ b/mk/rte.app.mk > > > > @@ -119,6 +119,10 @@ LDLIBS += -lm > > > > LDLIBS += -lrt > > > > endif > > > > > > > > +ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) > > > > +LDLIBS += -lpcap > > > > +endif > > > > + > > > > LDLIBS += --start-group > > > > > > > > ifeq ($(CONFIG_RTE_LIBRTE_KVARGS),y) > > > > @@ -207,7 +211,7 @@ LDLIBS += -lrte_pmd_ring > > > > endif > > > > > > > > ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) > > > > -LDLIBS += -lrte_pmd_pcap -lpcap > > > > +LDLIBS += -lrte_pmd_pcap > > > > endif > > > > > > > > ifeq ($(CONFIG_RTE_LIBRTE_PMD_AF_PACKET),y) > > > > > > Actually, what if we just add $(LDFLAGS) to the O_TO_S rule in mk/rte.lib.mk? > > > Then in lib/librte_pmd_pcap/Makefile, we can just add LDFLAGS+=-lpcap, and the > > > loading of the pcap pmd will itself require the loading of libpcap. That would > > > be a nice clean implementation that allows applications to just link the pmd and > > > not have to worry about dependencies. It would also allow us to clean up other > > > dependencies like the xenvirt pmd and vhost. > > > > Yes it makes sense. Could you test it please? > > What about applying my patch (which keep the existing logic) as a first > > fix/clean-up and then move -lpcap in PMD as a second step? > > Proceeding this way would allow to integrate a safe fix for 1.8.0. > > Maybe that linking pcap in the PMD could unveil new bugs with some distributions, > > so it would need some time to validate it. > > > ACK, I'm fine with your patch currently. I'll revisit this after 1.8 is > released > Neil Applied -- Thomas