diff mbox series

[v5,1/7] eal: prefix mbuf pool ops name with user defined

Message ID 1516428908-5430-2-git-send-email-hemant.agrawal@nxp.com
State New
Headers show
Series Dynamic HW Mempool Detection Support | expand

Commit Message

Hemant Agrawal Jan. 20, 2018, 6:15 a.m. UTC
This patch prefix the mbuf pool ops name with "user" to indicate
that it is user defined.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 lib/librte_eal/bsdapp/eal/eal.c          | 4 ++--
 lib/librte_eal/common/eal_internal_cfg.h | 3 ++-
 lib/librte_eal/linuxapp/eal/eal.c        | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

-- 
2.7.4

Comments

Olivier Matz Jan. 22, 2018, 1:23 p.m. UTC | #1
On Sat, Jan 20, 2018 at 11:45:02AM +0530, Hemant Agrawal wrote:
> This patch prefix the mbuf pool ops name with "user" to indicate

> that it is user defined.

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>


Acked-by: Olivier Matz <olivier.matz@6wind.com>
Hemant Agrawal Jan. 22, 2018, 1:24 p.m. UTC | #2
On 1/20/2018 11:45 AM, Hemant Agrawal wrote:
> This patch prefix the mbuf pool ops name with "user" to indicate

> that it is user defined.

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---

>   lib/librte_eal/bsdapp/eal/eal.c          | 4 ++--

>   lib/librte_eal/common/eal_internal_cfg.h | 3 ++-

>   lib/librte_eal/linuxapp/eal/eal.c        | 4 ++--

>   3 files changed, 6 insertions(+), 5 deletions(-)

> 


There is a compilation issue with this patch.  I will send a v6. Just 
waiting comments if any?
diff mbox series

Patch

diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 04cbd81..c602d02 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -114,7 +114,7 @@  int rte_cycles_vmware_tsc_map;
 const char *
 rte_eal_mbuf_default_mempool_ops(void)
 {
-	return internal_config.mbuf_pool_ops_name;
+	return internal_config.user_mbuf_pool_ops_name;
 }
 
 /* Return a pointer to the configuration structure */
@@ -397,7 +397,7 @@  eal_parse_args(int argc, char **argv)
 
 		switch (opt) {
 		case OPT_MBUF_POOL_OPS_NAME_NUM:
-			internal_config.mbuf_pool_ops_name = optarg;
+			internal_config.user_mbuf_pool_ops_name = optarg;
 			break;
 		case 'h':
 			eal_usage(prgname);
diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h
index c67685c..1169fcc 100644
--- a/lib/librte_eal/common/eal_internal_cfg.h
+++ b/lib/librte_eal/common/eal_internal_cfg.h
@@ -52,7 +52,8 @@  struct internal_config {
 	volatile enum rte_intr_mode vfio_intr_mode;
 	const char *hugefile_prefix;      /**< the base filename of hugetlbfs files */
 	const char *hugepage_dir;         /**< specific hugetlbfs directory to use */
-	const char *mbuf_pool_ops_name;   /**< mbuf pool ops name */
+	const char *user_mbuf_pool_ops_name;
+			/**< user defined mbuf pool ops name */
 	unsigned num_hugepage_sizes;      /**< how many sizes on this system */
 	struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES];
 };
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 229eec9..e8c7100 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -124,7 +124,7 @@  int rte_cycles_vmware_tsc_map;
 const char *
 rte_eal_mbuf_default_mempool_ops(void)
 {
-	return internal_config.mbuf_pool_ops_name;
+	return internal_config.user_mbuf_pool_ops_name;
 }
 
 /* Return a pointer to the configuration structure */
@@ -609,7 +609,7 @@  eal_parse_args(int argc, char **argv)
 			break;
 
 		case OPT_MBUF_POOL_OPS_NAME_NUM:
-			internal_config.mbuf_pool_ops_name = optarg;
+			internal_config.user_mbuf_pool_ops_name = optarg;
 			break;
 
 		default: