[dpdk-dev] eal_common_options.c: set create_uio_dev option to no argument

Message ID 1427098299-20876-1-git-send-email-gaohaifeng.gao@huawei.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

gaohaifeng March 23, 2015, 8:11 a.m. UTC
  From: Haifeng Gao <gaohaifeng.gao@huawei.com>

eal options OPT_CREATE_UIO_DEV does not need argument so set it to zero.
It needs to reset create_uio_dev explicitly.

Signed-off-by: Haifeng Gao <gaohaifeng.gao@huawei.com>
---
 lib/librte_eal/common/eal_common_options.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Olivier Matz March 23, 2015, 4:13 p.m. UTC | #1
Hi,

On 03/23/2015 09:11 AM, gaohaifeng wrote:
> From: Haifeng Gao <gaohaifeng.gao@huawei.com>
> 
> eal options OPT_CREATE_UIO_DEV does not need argument so set it to zero.
> It needs to reset create_uio_dev explicitly.
> 
> Signed-off-by: Haifeng Gao <gaohaifeng.gao@huawei.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

Thank you for fixing this.

Note for Thomas: the bug is there since my initial commit adding
the feature, you may want to add this to the commit log:
Fixes: f7f97c16048e (" pci: add option --create-uio-dev to run without
hotplug")


Regards,
Olivier
  
Thomas Monjalon March 23, 2015, 4:37 p.m. UTC | #2
> > eal options OPT_CREATE_UIO_DEV does not need argument so set it to zero.
> > It needs to reset create_uio_dev explicitly.
> > 
> > Signed-off-by: Haifeng Gao <gaohaifeng.gao@huawei.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
> 
> Thank you for fixing this.
> 
> Note for Thomas: the bug is there since my initial commit adding
> the feature, you may want to add this to the commit log:
> Fixes: f7f97c16048e (" pci: add option --create-uio-dev to run without
> hotplug")

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 4319549..8fcb1ab 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -70,7 +70,7 @@  eal_short_options[] =
 const struct option
 eal_long_options[] = {
 	{OPT_BASE_VIRTADDR,     1, NULL, OPT_BASE_VIRTADDR_NUM    },
-	{OPT_CREATE_UIO_DEV,    1, NULL, OPT_CREATE_UIO_DEV_NUM   },
+	{OPT_CREATE_UIO_DEV,    0, NULL, OPT_CREATE_UIO_DEV_NUM   },
 	{OPT_FILE_PREFIX,       1, NULL, OPT_FILE_PREFIX_NUM      },
 	{OPT_HELP,              0, NULL, OPT_HELP_NUM             },
 	{OPT_HUGE_DIR,          1, NULL, OPT_HUGE_DIR_NUM         },
@@ -131,6 +131,7 @@  eal_reset_internal_config(struct internal_config *internal_cfg)
 	internal_cfg->no_hpet = 1;
 #endif
 	internal_cfg->vmware_tsc_map = 0;
+	internal_cfg->create_uio_dev = 0;
 }
 
 /*