Message ID | 571DDDD8.6000000@igel.co.jp (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Yuanhan Liu |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 3E9152946; Mon, 25 Apr 2016 11:05:34 +0200 (CEST) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by dpdk.org (Postfix) with ESMTP id DCF2828F2 for <dev@dpdk.org>; Mon, 25 Apr 2016 11:05:32 +0200 (CEST) Received: by mail-pa0-f44.google.com with SMTP id zm5so62356006pac.0 for <dev@dpdk.org>; Mon, 25 Apr 2016 02:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=9ZLKrNnrxRWGS1vfVRgpigZGB6ik61nvXrMCB9y38FE=; b=0w9uyY24p37c5wCAwMBR4SPEtyuLKrq7rglurYUe2YA155g2XmkOWjH81ucgfHZTMq ySh9fFaevlkrvJhKdl35/ZnfjBMFZp8kMVXTFgIAaERohCSxYyxn6NmDc6yCtAFAQDEI jVHCYJITz99xA+8j7DcQnc/T8e0zwl0SuGxtz5SHJ/FaHk0PLXx3MAgCQuniMI7oR2fE d4bwJpN5Jkm08YO7ttHnJB1fCoolGtEt/I0tvOyx02JDe9MVNKdkU8aexSZpNMEdZLHW Jqn7qQTmfdboYWJdHvbJ4jSsBH2HF8Tl1VV2V6jBsEGA8gkGnrhT6TStel+NhicfQOTN LjpA== 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:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=9ZLKrNnrxRWGS1vfVRgpigZGB6ik61nvXrMCB9y38FE=; b=QgpT5gF7QJhafB2kWmfrQB9kKBuCl+JT1TumdwPsuL6TjB7fiJUjU/qFz+JFfon7n/ tfI/L9HEhjB1MbQAryMIZnHLHEmmVIPXqCdyNgN4rCHpg49tyD9DIpAEChSJoAtGn6sH 7+kSiOZYv6j11LXtIEzdsc1Zk12+wNsMeOh5RD4pwZDnAZT8gxqm9SzE2p6yJvkvaYSo 1ns9FhO2R6TA00pP28QcO0h60ofY/mIItO6TzVmUuHGRynZy1AP2+9zACGAyuehVISEs E5LXyxSmxlnDpUj0W9gd9gW07BRepGDNYhx3DIb+OMS0HweUN9xvp3AiMsDTB+rcM0cV D5hA== X-Gm-Message-State: AOPr4FX+TpnTw4flGuQmOBdGUjeFUxpFt6a9GrDWzBG5gh58Swqqy+cIDY3iXfqIW3QMJw== X-Received: by 10.66.78.73 with SMTP id z9mr46860453paw.4.1461575132095; Mon, 25 Apr 2016 02:05:32 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id lq10sm27972838pab.36.2016.04.25.02.05.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Apr 2016 02:05:30 -0700 (PDT) From: Tetsuya Mukawa <mukawa@igel.co.jp> To: "dev@dpdk.org" <dev@dpdk.org>, Yuanhan Liu <yuanhan.liu@linux.intel.com> Cc: "Xie, Huawei" <huawei.xie@intel.com> Message-ID: <571DDDD8.6000000@igel.co.jp> Date: Mon, 25 Apr 2016 18:05:28 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [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 <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Tetsuya Mukawa
April 25, 2016, 9:05 a.m. UTC
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. This is same way to link libpcap to librte_pmd_pcap. What do you think about adding it to vhost PMD? Thanks, Tetsuya
Comments
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 <pmatilai@redhat.com> - Panu - > > Thanks, > Tetsuya >
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 <pmatilai@redhat.com> > > - 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 >> >
On Mon, Apr 25, 2016 at 12:28:37PM +0300, Panu Matilainen wrote: > > >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 <pmatilai@redhat.com> Panu, thanks for the input. Tetsuya, please submit a formal patch so that I can merge. --yliu
On 2016/04/26 12:47, Yuanhan Liu wrote: > On Mon, Apr 25, 2016 at 12:28:37PM +0300, Panu Matilainen wrote: > > >>> 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 <pmatilai@redhat.com> > Panu, thanks for the input. > > Tetsuya, please submit a formal patch so that I can merge. > > --yliu Hi Yuanhan, Oh sorry, I forgot to add "--in-reply-to" while sending the patch, so you may miss it. Also the order of Acked-by and Signed-off-by was wrong in above patch. So I will send v2 soon. Thanks, Tetsuya
On Tue, Apr 26, 2016 at 02:37:37PM +0900, Tetsuya Mukawa wrote: > On 2016/04/26 12:47, Yuanhan Liu wrote: > > On Mon, Apr 25, 2016 at 12:28:37PM +0300, Panu Matilainen wrote: > > > > >>> 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 <pmatilai@redhat.com> > > Panu, thanks for the input. > > > > Tetsuya, please submit a formal patch so that I can merge. > > > > --yliu > > Hi Yuanhan, > > Oh sorry, I forgot to add "--in-reply-to" while sending the patch, so > you may miss it. > Also the order of Acked-by and Signed-off-by was wrong in above patch. > So I will send v2 soon. No worry. I could fix them, and I don't think there is a very strict rule for both of them :) BTW, FYI, I just found my linux.intel.com seems to be broken (no idea why), thus I made late response. (well, I found you just send a v2; I will apply that tomorrow). --yliu
On 2016/04/26 14:48, Yuanhan Liu wrote: > On Tue, Apr 26, 2016 at 02:37:37PM +0900, Tetsuya Mukawa wrote: >> On 2016/04/26 12:47, Yuanhan Liu wrote: >>> On Mon, Apr 25, 2016 at 12:28:37PM +0300, Panu Matilainen wrote: >>> > >>>>> 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 <pmatilai@redhat.com> >>> Panu, thanks for the input. >>> >>> Tetsuya, please submit a formal patch so that I can merge. >>> >>> --yliu >> Hi Yuanhan, >> >> Oh sorry, I forgot to add "--in-reply-to" while sending the patch, so >> you may miss it. >> Also the order of Acked-by and Signed-off-by was wrong in above patch. >> So I will send v2 soon. > No worry. I could fix them, and I don't think there is a very strict > rule for both of them :) BTW, FYI, I just found my linux.intel.com > seems to be broken (no idea why), thus I made late response. > > (well, I found you just send a v2; I will apply that tomorrow). > > --yliu Thank you so much! Tetsuya
--- 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