From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [RFC] Link ibrte_vhost to librte_pmd_vhost Date: Mon, 25 Apr 2016 18:44:52 +0900 Message-ID: <571DE714.9050402@igel.co.jp> References: <571DDDD8.6000000@igel.co.jp> <571DE345.4000609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Yuanhan Liu , "Xie, Huawei" To: Panu Matilainen , "dev@dpdk.org" Return-path: Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by dpdk.org (Postfix) with ESMTP id 580181BBE for ; Mon, 25 Apr 2016 11:44:56 +0200 (CEST) Received: by mail-pa0-f48.google.com with SMTP id r5so56479417pag.1 for ; Mon, 25 Apr 2016 02:44:56 -0700 (PDT) In-Reply-To: <571DE345.4000609@redhat.com> 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 2016/04/25 18:28, Panu Matilainen wrote: > 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 - Hi Panu, I appreciate your comment. I will send it as a patch tomorrow. It seems I cannot connect to DPDK git repository so far. So I cannot test it with latest code. Thanks, Tetsuya > > >> >> Thanks, >> Tetsuya >> >