From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 2F90A2B87 for ; Mon, 25 Apr 2016 11:28:40 +0200 (CEST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 969B8C049E1E; Mon, 25 Apr 2016 09:28:39 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-4-36.ams2.redhat.com [10.36.4.36]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3P9Sbgx015217; Mon, 25 Apr 2016 05:28:38 -0400 To: Tetsuya Mukawa , "dev@dpdk.org" , Yuanhan Liu References: <571DDDD8.6000000@igel.co.jp> Cc: "Xie, Huawei" From: Panu Matilainen Message-ID: <571DE345.4000609@redhat.com> Date: Mon, 25 Apr 2016 12:28:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <571DDDD8.6000000@igel.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Subject: Re: [dpdk-dev] [RFC] Link ibrte_vhost to librte_pmd_vhost 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: Mon, 25 Apr 2016 09:28:40 -0000 On 04/25/2016 12:05 PM, Tetsuya Mukawa wrote: > Hi Yuanhan, > > I want to apply a patch to vhost PMD. > Before submitting, could you please let me know your guess about the patch? > > Here is my problem. > I am using below shared library configuration to build my application. > CONFIG_RTE_BUILD_SHARED_LIB=y > Normally, My application doesn't need vhost facilities, so librte_vhost > isn't linked while compiling. > > Sometimes, I need to use vhost PMD, so I just want to add '-d > librte_pmd_vhost.so' to DPDK command line to load vhost PMD library. > But my application doesn't have librte_vhost, then I've got an error > about it. > Even if specify like "-d librte_vhost -d librte_pmd_vhost", I still have > an error. > Probably this is because above libraries will be dlopen(ed) with > RTLD_LOCAL option. > > Here, I have 2 choices. > One is linking librte_vhost to my application while compiling, even if I > don't need it normally. > This is the way all DPDK examples did. But I am wondering if I should > follow this. > > Another way is applying a below patch. > --- a/drivers/net/vhost/Makefile > +++ b/drivers/net/vhost/Makefile > @@ -38,6 +38,7 @@ LIB = librte_pmd_vhost.a > > CFLAGS += -O3 > CFLAGS += $(WERROR_FLAGS) > +LDLIBS += -lrte_vhost > > EXPORT_MAP := rte_pmd_vhost_version.map > > This is same way to link libpcap to librte_pmd_pcap. > What do you think about adding it to vhost PMD? Yes, this is absolutely the right thing to do. Ultimately this should be done for all dependencies in all libraries, but missing dependencies are even more pronounced in plugins so the sooner this goes in, the better. Acked-by: Panu Matilainen - Panu - > > Thanks, > Tetsuya >