All of lore.kernel.org
 help / color / mirror / Atom feed
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>
Subject: [RFC] Link ibrte_vhost to librte_pmd_vhost
Date: Mon, 25 Apr 2016 18:05:28 +0900	[thread overview]
Message-ID: <571DDDD8.6000000@igel.co.jp> (raw)

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?

Thanks,
Tetsuya

             reply	other threads:[~2016-04-25  9:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25  9:05 Tetsuya Mukawa [this message]
2016-04-25  9:28 ` [RFC] Link ibrte_vhost to librte_pmd_vhost Panu Matilainen
2016-04-25  9:44   ` Tetsuya Mukawa
2016-04-26  3:47   ` Yuanhan Liu
2016-04-26  5:37     ` Tetsuya Mukawa
2016-04-26  5:48       ` Yuanhan Liu
2016-04-26  6:00         ` Tetsuya Mukawa
2016-04-26  5:39 ` [PATCH v2] vhost: Fix linkage of vhost PMD Tetsuya Mukawa
2016-04-26  9:35   ` Panu Matilainen
2016-04-27  1:38     ` Tetsuya Mukawa
2016-04-27 22:21   ` Yuanhan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571DDDD8.6000000@igel.co.jp \
    --to=mukawa@igel.co.jp \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.