diff mbox

[ovs-dev] dpdk: Use VLOG_INFO_ONCE instead of open-coding it.

Message ID 20170308234439.10918-1-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff March 8, 2017, 11:44 p.m. UTC
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 lib/dpdk.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Andy Zhou March 9, 2017, 1:09 a.m. UTC | #1
On Wed, Mar 8, 2017 at 3:44 PM, Ben Pfaff <blp@ovn.org> wrote:
> Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Andy Zhou <azhou@ovn.org>
Ben Pfaff March 9, 2017, 3:39 a.m. UTC | #2
On Wed, Mar 08, 2017 at 05:09:27PM -0800, Andy Zhou wrote:
> On Wed, Mar 8, 2017 at 3:44 PM, Ben Pfaff <blp@ovn.org> wrote:
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> Acked-by: Andy Zhou <azhou@ovn.org>

Thanks, I applied this to master.
diff mbox

Patch

diff --git a/lib/dpdk.c b/lib/dpdk.c
index c1626e2246b5..9e873617e8a4 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -1,5 +1,5 @@ 
 /*
- * Copyright (c) 2014, 2015, 2016 Nicira, Inc.
+ * Copyright (c) 2014, 2015, 2016, 2017 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -424,11 +424,7 @@  dpdk_init(const struct smap *ovs_other_config)
             ovsthread_once_done(&once_enable);
         }
     } else {
-        static struct ovsthread_once once_disable = OVSTHREAD_ONCE_INITIALIZER;
-        if (ovsthread_once_start(&once_disable)) {
-            VLOG_INFO("DPDK Disabled - Use other_config:dpdk-init to enable");
-            ovsthread_once_done(&once_disable);
-        }
+        VLOG_INFO_ONCE("DPDK Disabled - Use other_config:dpdk-init to enable");
     }
 }