DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] eal: fix build with Xen dom0 enabled
Date: Thu,  3 Dec 2015 05:25:14 +0100	[thread overview]
Message-ID: <1449116714-17711-1-git-send-email-thomas.monjalon@6wind.com> (raw)

There is a new function in the EAL API for internal use.
It has neither a proper prefix nor a .map export:
libethdev.so: undefined reference to `is_xen_dom0_supported'

Fixes: 719dbebceb81 ("xen: allow determining DOM0 at runtime")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/net/i40e/i40e_rxtx.c                    | 2 +-
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   | 1 +
 lib/librte_eal/common/include/rte_memory.h      | 6 +++---
 lib/librte_eal/linuxapp/eal/eal_memory.c        | 2 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 +
 lib/librte_ether/rte_ethdev.c                   | 2 +-
 lib/librte_mempool/rte_mempool.c                | 2 +-
 7 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 13abd67..c6a18b5 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2531,7 +2531,7 @@ i40e_memzone_reserve(const char *name, uint32_t len, int socket_id)
 	if (mz)
 		return mz;
 
-	if (is_xen_dom0_supported())
+	if (rte_xen_dom0_supported())
 		mz = rte_memzone_reserve_bounded(name, len,
 				socket_id, 0, I40E_RING_BASE_ALIGN, RTE_PGSIZE_2M);
 	else
diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
index f9d4b1c..7a88387 100644
--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
@@ -134,5 +134,6 @@ DPDK_2.2 {
 	rte_keepalive_dispatch_pings;
 	rte_keepalive_mark_alive;
 	rte_keepalive_register_core;
+	rte_xen_dom0_supported;
 
 } DPDK_2.1;
diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h
index 33f5a77..9c9e40f 100644
--- a/lib/librte_eal/common/include/rte_memory.h
+++ b/lib/librte_eal/common/include/rte_memory.h
@@ -184,7 +184,7 @@ unsigned rte_memory_get_nrank(void);
 #ifdef RTE_LIBRTE_XEN_DOM0
 
 /**< Internal use only - should DOM0 memory mapping be used */
-extern int is_xen_dom0_supported(void);
+extern int rte_xen_dom0_supported(void);
 
 /**< Internal use only - phys to virt mapping for xen */
 phys_addr_t rte_xen_mem_phy2mch(uint32_t, const phys_addr_t);
@@ -203,7 +203,7 @@ phys_addr_t rte_xen_mem_phy2mch(uint32_t, const phys_addr_t);
 static inline phys_addr_t
 rte_mem_phy2mch(uint32_t memseg_id, const phys_addr_t phy_addr)
 {
-	if (is_xen_dom0_supported())
+	if (rte_xen_dom0_supported())
 		return rte_xen_mem_phy2mch(memseg_id, phy_addr);
 	else
 		return phy_addr;
@@ -231,7 +231,7 @@ int rte_xen_dom0_memory_init(void);
  */
 int rte_xen_dom0_memory_attach(void);
 #else
-static inline int is_xen_dom0_supported(void)
+static inline int rte_xen_dom0_supported(void)
 {
 	return 0;
 }
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 0de75cd..846fd31 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -98,7 +98,7 @@
 #include "eal_hugepages.h"
 
 #ifdef RTE_LIBRTE_XEN_DOM0
-int is_xen_dom0_supported(void)
+int rte_xen_dom0_supported(void)
 {
 	return internal_config.xen_dom0_support;
 }
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 54d496e..828496f 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -137,5 +137,6 @@ DPDK_2.2 {
 	rte_keepalive_dispatch_pings;
 	rte_keepalive_mark_alive;
 	rte_keepalive_register_core;
+	rte_xen_dom0_supported;
 
 } DPDK_2.1;
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 3840775..c3eed49 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2605,7 +2605,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
 	if (mz)
 		return mz;
 
-	if (is_xen_dom0_supported())
+	if (rte_xen_dom0_supported())
 		return rte_memzone_reserve_bounded(z_name, size, socket_id,
 						   0, align, RTE_PGSIZE_2M);
 	else
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index f53076a..aff5f6d 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -403,7 +403,7 @@ rte_mempool_create(const char *name, unsigned n, unsigned elt_size,
 		   rte_mempool_obj_ctor_t *obj_init, void *obj_init_arg,
 		   int socket_id, unsigned flags)
 {
-	if (is_xen_dom0_supported())
+	if (rte_xen_dom0_supported())
 		return rte_dom0_mempool_create(name, n, elt_size,
 					       cache_size, private_data_size,
 					       mp_init, mp_init_arg,
-- 
2.5.2

             reply	other threads:[~2015-12-03  4:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  4:25 Thomas Monjalon [this message]
2015-12-05 23:59 ` Thomas Monjalon

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=1449116714-17711-1-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).