From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: jerin.jacob@caviumnetworks.com, jingjing.wu@intel.com,
bruce.richardson@intel.com, hemant.agrawal@nxp.com,
ferruh.yigit@intel.com, thomas@monjalon.net,
olivier.matz@6wind.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 1/3] eal: add API to set default mbuf mempool ops
Date: Thu, 14 Dec 2017 01:25:36 +0530 [thread overview]
Message-ID: <20171213195538.14290-2-pbhagavatula@caviumnetworks.com> (raw)
In-Reply-To: <20171213195538.14290-1-pbhagavatula@caviumnetworks.com>
Add new API to set the default mbuf mempool ops name i.e. set the provided
ops name to `internal_config.mbuf_pool_ops_name`.
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
lib/librte_eal/bsdapp/eal/eal.c | 6 ++++++
lib/librte_eal/common/include/rte_eal.h | 9 +++++++++
lib/librte_eal/linuxapp/eal/eal.c | 6 ++++++
lib/librte_eal/rte_eal_version.map | 6 ++++++
4 files changed, 27 insertions(+)
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 369a682a8..dc87ffbdc 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -117,6 +117,12 @@ rte_eal_mbuf_default_mempool_ops(void)
return internal_config.mbuf_pool_ops_name;
}
+void
+rte_eal_set_mbuf_default_mempool_ops(const char *ops_name)
+{
+ internal_config.mbuf_pool_ops_name = ops_name;
+}
+
/* Return a pointer to the configuration structure */
struct rte_config *
rte_eal_get_configuration(void)
diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 8e4e71cc1..eb7db5797 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -335,6 +335,15 @@ enum rte_iova_mode rte_eal_iova_mode(void);
const char *
rte_eal_mbuf_default_mempool_ops(void);
+/**
+ * Set default pool ops name for mbuf
+ *
+ * @param ops_name
+ * mempool ops name that is to be set as default.
+ */
+void
+rte_eal_set_mbuf_default_mempool_ops(const char *ops_name);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 229eec9f1..5c6feff64 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -127,6 +127,12 @@ rte_eal_mbuf_default_mempool_ops(void)
return internal_config.mbuf_pool_ops_name;
}
+void
+rte_eal_set_mbuf_default_mempool_ops(const char *ops_name)
+{
+ internal_config.mbuf_pool_ops_name = ops_name;
+}
+
/* Return a pointer to the configuration structure */
struct rte_config *
rte_eal_get_configuration(void)
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index f4f46c1be..43a6fa97f 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -200,6 +200,12 @@ DPDK_17.11 {
} DPDK_17.08;
+DPDK_18.02 {
+ global:
+
+ rte_eal_set_mbuf_default_mempool_ops;
+} DPDK_17.11;
+
EXPERIMENTAL {
global:
--
2.14.1
next prev parent reply other threads:[~2017-12-13 19:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 19:55 [dpdk-dev] [PATCH 0/3] ethdev: add API to get preferred mbuf pool ops Pavan Nikhilesh
2017-12-13 19:55 ` Pavan Nikhilesh [this message]
2017-12-13 19:55 ` [dpdk-dev] [PATCH 2/3] ethdev: add API to get preferred mempool ops name Pavan Nikhilesh
2017-12-13 19:55 ` [dpdk-dev] [PATCH 3/3] app/testpmd: set preferred mempool as default pktpool Pavan Nikhilesh
2018-01-16 6:06 ` Lu, Wenzhuo
2018-01-16 8:20 ` Pavan Nikhilesh
2017-12-13 21:22 ` [dpdk-dev] [PATCH 0/3] ethdev: add API to get preferred mbuf pool ops 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=20171213195538.14290-2-pbhagavatula@caviumnetworks.com \
--to=pbhagavatula@caviumnetworks.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jingjing.wu@intel.com \
--cc=olivier.matz@6wind.com \
--cc=thomas@monjalon.net \
/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).