summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2019-03-01 14:59:33 +0300
committerIan Stokes <ian.stokes@intel.com>2019-03-04 06:55:03 +0000
commit6455316bd23ba34132bd548b00605eb16568a13b (patch)
treec8c24f79205ab33a4712b05bef8db1204f806e37 /lib
parent5832e6a4f103a1eddd62c9ba459ce669e3a5d132 (diff)
downloadopenvswitch-6455316bd23ba34132bd548b00605eb16568a13b.tar.gz
dpdk: Fix case-sensitivity of dpdk-init knob.
Before supporting the DPDK initialization status in DB 'dpdk-init' was just a boolean and 'smap_get_bool', which is case-insensitive, was used to get the value. Current code uses simple 'strcmp' that fails to recognize values like "True". As a result this breaks different OVS configuration tools. For example, kolla-ansible uses 'other_config:dpdk-init=True' but OVS is not able to recognize it leading to broken installations. 'strcasecmp' should be used instead to fix the issue. CC: Aaron Conole <aconole@redhat.com> Fixes: 3e52fa5644cd ("dpdk: reflect status and version in the database") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/dpdk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dpdk.c b/lib/dpdk.c
index 53b74fba4..d7901e175 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -441,8 +441,8 @@ dpdk_init(const struct smap *ovs_other_config)
const char *dpdk_init_val = smap_get_def(ovs_other_config, "dpdk-init",
"false");
- bool try_only = !strcmp(dpdk_init_val, "try");
- if (!strcmp(dpdk_init_val, "true") || try_only) {
+ bool try_only = !strcasecmp(dpdk_init_val, "try");
+ if (!strcasecmp(dpdk_init_val, "true") || try_only) {
static struct ovsthread_once once_enable = OVSTHREAD_ONCE_INITIALIZER;
if (ovsthread_once_start(&once_enable)) {