A new function vlog_insert_module() is introduced to avoid using list_insert() from the vlog.h header.
Signed-off-by: Thomas Graf <tg...@noironetworks.com> --- include/openvswitch/automake.mk | 3 +- include/openvswitch/vlog.h | 296 ++++++++++++++++++++++++++++++++++++++++ lib/automake.mk | 1 - lib/backtrace.c | 2 +- lib/bfd.c | 2 +- lib/bundle.c | 2 +- lib/cfm.c | 2 +- lib/classifier.c | 2 +- lib/command-line.c | 2 +- lib/coverage.c | 2 +- lib/daemon-unix.c | 2 +- lib/daemon-windows.c | 2 +- lib/daemon.c | 4 +- lib/dpif-netdev.c | 2 +- lib/dpif-netlink.c | 2 +- lib/dpif.c | 2 +- lib/entropy.c | 4 +- lib/fatal-signal.c | 2 +- lib/getopt_long.c | 2 +- lib/getrusage-windows.c | 2 +- lib/hmap.c | 2 +- lib/jsonrpc.c | 2 +- lib/lacp.c | 2 +- lib/learning-switch.c | 2 +- lib/lockfile.c | 2 +- lib/mcast-snooping.c | 2 +- lib/memory.c | 2 +- lib/meta-flow.c | 2 +- lib/netdev-bsd.c | 2 +- lib/netdev-dpdk.c | 2 +- lib/netdev-dummy.c | 2 +- lib/netdev-linux.c | 2 +- lib/netdev-vport.c | 2 +- lib/netdev-windows.c | 2 +- lib/netdev.c | 2 +- lib/netlink-notifier.c | 2 +- lib/netlink-socket.c | 2 +- lib/netlink.c | 2 +- lib/nx-match.c | 2 +- lib/odp-util.c | 2 +- lib/ofp-actions.c | 2 +- lib/ofp-errors.c | 2 +- lib/ofp-msgs.c | 2 +- lib/ofp-util.c | 2 +- lib/ovs-numa.c | 2 +- lib/ovs-rcu.c | 2 +- lib/ovs-thread.c | 3 +- lib/ovsdb-error.c | 2 +- lib/ovsdb-idl.c | 2 +- lib/pcap-file.c | 2 +- lib/poll-loop.c | 2 +- lib/process.c | 2 +- lib/rconn.c | 2 +- lib/reconnect.c | 2 +- lib/route-table.c | 2 +- lib/rstp-state-machines.c | 2 +- lib/rstp.c | 2 +- lib/rtbsd.c | 2 +- lib/signals.c | 2 +- lib/socket-util-unix.c | 2 +- lib/socket-util.c | 2 +- lib/stp.c | 3 +- lib/stream-fd.c | 2 +- lib/stream-nossl.c | 2 +- lib/stream-ssl.c | 2 +- lib/stream-tcp.c | 2 +- lib/stream-unix.c | 2 +- lib/stream.c | 2 +- lib/svec.c | 2 +- lib/timeval.c | 2 +- lib/tnl-arp-cache.c | 2 +- lib/unixctl.c | 2 +- lib/util.c | 2 +- lib/vconn-stream.c | 2 +- lib/vconn.c | 2 +- lib/vlandev.c | 2 +- lib/vlog.c | 7 +- lib/vlog.h | 296 ---------------------------------------- ofproto/bond.c | 2 +- ofproto/bundles.c | 2 +- ofproto/collectors.c | 2 +- ofproto/connmgr.c | 2 +- ofproto/fail-open.c | 2 +- ofproto/in-band.c | 2 +- ofproto/netflow.c | 2 +- ofproto/ofproto-dpif-ipfix.c | 2 +- ofproto/ofproto-dpif-mirror.c | 2 +- ofproto/ofproto-dpif-monitor.c | 2 +- ofproto/ofproto-dpif-sflow.c | 2 +- ofproto/ofproto-dpif-upcall.c | 2 +- ofproto/ofproto-dpif-xlate.c | 2 +- ofproto/ofproto-dpif.c | 2 +- ofproto/ofproto.c | 2 +- ofproto/pktbuf.c | 2 +- ofproto/tunnel.c | 2 +- ovsdb/file.c | 2 +- ovsdb/jsonrpc-server.c | 2 +- ovsdb/ovsdb-client.c | 2 +- ovsdb/ovsdb-server.c | 2 +- ovsdb/ovsdb-tool.c | 2 +- tests/test-flows.c | 2 +- tests/test-jsonrpc.c | 2 +- tests/test-lockfile.c | 2 +- tests/test-netflow.c | 2 +- tests/test-odp.c | 2 +- tests/test-ovsdb.c | 2 +- tests/test-reconnect.c | 2 +- tests/test-rstp.c | 2 +- tests/test-sflow.c | 2 +- tests/test-stp.c | 2 +- tests/test-util.c | 2 +- tests/test-vconn.c | 2 +- utilities/nlmon.c | 2 +- utilities/ovs-appctl.c | 2 +- utilities/ovs-benchmark.c | 2 +- utilities/ovs-dpctl.c | 2 +- utilities/ovs-ofctl.c | 2 +- utilities/ovs-testcontroller.c | 2 +- utilities/ovs-vsctl.c | 2 +- vswitchd/bridge.c | 2 +- vswitchd/ovs-vswitchd.c | 2 +- vswitchd/system-stats.c | 2 +- vswitchd/xenserver.c | 3 +- vtep/vtep-ctl.c | 2 +- 124 files changed, 429 insertions(+), 419 deletions(-) create mode 100644 include/openvswitch/vlog.h delete mode 100644 lib/vlog.h diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index 0b95a0f..5e9b77a 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -6,5 +6,6 @@ openvswitchinclude_HEADERS = \ include/openvswitch/token-bucket.h \ include/openvswitch/types.h \ include/openvswitch/util.h \ - include/openvswitch/version.h + include/openvswitch/version.h \ + include/openvswitch/vlog.h diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h new file mode 100644 index 0000000..664abbc --- /dev/null +++ b/include/openvswitch/vlog.h @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OPENVSWITCH_VLOG_H +#define OPENVSWITCH_VLOG_H 1 + +/* Logging. + * + * + * Thread-safety + * ============= + * + * Fully thread safe. + */ + +#include <limits.h> +#include <stdarg.h> +#include <stdbool.h> +#include <time.h> +#include <openvswitch/compiler.h> +#include <openvswitch/list.h> +#include <openvswitch/thread.h> +#include <openvswitch/token-bucket.h> +#include <openvswitch/util.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Logging severity levels. + * + * ovs-appctl(8) defines each of the log levels. */ +#define VLOG_LEVELS \ + VLOG_LEVEL(OFF, LOG_ALERT, 1) \ + VLOG_LEVEL(EMER, LOG_ALERT, 1) \ + VLOG_LEVEL(ERR, LOG_ERR, 3) \ + VLOG_LEVEL(WARN, LOG_WARNING, 4) \ + VLOG_LEVEL(INFO, LOG_NOTICE, 5) \ + VLOG_LEVEL(DBG, LOG_DEBUG, 7) +enum vlog_level { +#define VLOG_LEVEL(NAME, SYSLOG_LEVEL, RFC5424_LEVEL) VLL_##NAME, + VLOG_LEVELS +#undef VLOG_LEVEL + VLL_N_LEVELS +}; + +const char *vlog_get_level_name(enum vlog_level); +enum vlog_level vlog_get_level_val(const char *name); + +/* Facilities that we can log to. */ +#define VLOG_FACILITIES \ + VLOG_FACILITY(SYSLOG, "ovs|%05N|%c%T|%p|%m") \ + VLOG_FACILITY(CONSOLE, "%D{%Y-%m-%dT%H:%M:%SZ}|%05N|%c%T|%p|%m") \ + VLOG_FACILITY(FILE, "%D{%Y-%m-%dT%H:%M:%S.###Z}|%05N|%c%T|%p|%m") +enum vlog_facility { +#define VLOG_FACILITY(NAME, PATTERN) VLF_##NAME, + VLOG_FACILITIES +#undef VLOG_FACILITY + VLF_N_FACILITIES, + VLF_ANY_FACILITY = -1 +}; + +const char *vlog_get_facility_name(enum vlog_facility); +enum vlog_facility vlog_get_facility_val(const char *name); + +/* A log module. */ +struct vlog_module { + struct ovs_list list; + const char *name; /* User-visible name. */ + int levels[VLF_N_FACILITIES]; /* Minimum log level for each facility. */ + int min_level; /* Minimum log level for any facility. */ + bool honor_rate_limits; /* Set false to ignore rate limits. */ +}; + +/* Global list of all logging modules */ +extern struct ovs_list vlog_modules; + +void vlog_insert_module(struct ovs_list *); + +/* Creates and initializes a global instance of a module named MODULE. */ +#define VLOG_DEFINE_MODULE(MODULE) \ + VLOG_DEFINE_MODULE__(MODULE) \ + OVS_CONSTRUCTOR(init_##MODULE) { \ + vlog_insert_module(&VLM_##MODULE.list); \ + } \ + +const char *vlog_get_module_name(const struct vlog_module *); +struct vlog_module *vlog_module_from_name(const char *name); + +/* Rate-limiter for log messages. */ +struct vlog_rate_limit { + struct token_bucket token_bucket; + time_t first_dropped; /* Time first message was dropped. */ + time_t last_dropped; /* Time of most recent message drop. */ + unsigned int n_dropped; /* Number of messages dropped. */ + struct ovs_mutex mutex; /* Mutual exclusion for rate limit. */ +}; + +/* Number of tokens to emit a message. We add 'rate' tokens per millisecond, + * thus 60,000 tokens are required to emit one message per minute. */ +#define VLOG_MSG_TOKENS (60 * 1000) + +/* Initializer for a struct vlog_rate_limit, to set up a maximum rate of RATE + * messages per minute and a maximum burst size of BURST messages. */ +#define VLOG_RATE_LIMIT_INIT(RATE, BURST) \ + { \ + TOKEN_BUCKET_INIT(RATE, OVS_SAT_MUL(BURST, VLOG_MSG_TOKENS)), \ + 0, /* first_dropped */ \ + 0, /* last_dropped */ \ + 0, /* n_dropped */ \ + OVS_MUTEX_INITIALIZER /* mutex */ \ + } + +/* Configuring how each module logs messages. */ +enum vlog_level vlog_get_level(const struct vlog_module *, enum vlog_facility); +void vlog_set_levels(struct vlog_module *, + enum vlog_facility, enum vlog_level); +char *vlog_set_levels_from_string(const char *) OVS_WARN_UNUSED_RESULT; +void vlog_set_levels_from_string_assert(const char *); +char *vlog_get_levels(void); +bool vlog_is_enabled(const struct vlog_module *, enum vlog_level); +bool vlog_should_drop(const struct vlog_module *, enum vlog_level, + struct vlog_rate_limit *); +void vlog_set_verbosity(const char *arg); + +/* Configuring log facilities. */ +void vlog_set_pattern(enum vlog_facility, const char *pattern); +int vlog_set_log_file(const char *file_name); +int vlog_reopen_log_file(void); + +/* Configure syslog target. */ +void vlog_set_syslog_target(const char *target); + +/* Initialization. */ +void vlog_init(void); +void vlog_enable_async(void); + +/* Functions for actual logging. */ +void vlog(const struct vlog_module *, enum vlog_level, const char *format, ...) + OVS_PRINTF_FORMAT (3, 4); +void vlog_valist(const struct vlog_module *, enum vlog_level, + const char *, va_list) + OVS_PRINTF_FORMAT (3, 0); + +OVS_NO_RETURN void vlog_fatal(const struct vlog_module *, const char *format, ...) + OVS_PRINTF_FORMAT (2, 3); +OVS_NO_RETURN void vlog_fatal_valist(const struct vlog_module *, + const char *format, va_list) + OVS_PRINTF_FORMAT (2, 0); + +OVS_NO_RETURN void vlog_abort(const struct vlog_module *, const char *format, ...) + OVS_PRINTF_FORMAT (2, 3); +OVS_NO_RETURN void vlog_abort_valist(const struct vlog_module *, + const char *format, va_list) + OVS_PRINTF_FORMAT (2, 0); + +void vlog_rate_limit(const struct vlog_module *, enum vlog_level, + struct vlog_rate_limit *, const char *, ...) + OVS_PRINTF_FORMAT (4, 5); + +/* Creates and initializes a global instance of a module named MODULE, and + * defines a static variable named THIS_MODULE that points to it, for use with + * the convenience macros below. */ +#define VLOG_DEFINE_THIS_MODULE(MODULE) \ + VLOG_DEFINE_MODULE(MODULE); \ + static struct vlog_module *const THIS_MODULE = &VLM_##MODULE + +/* Convenience macros. These assume that THIS_MODULE points to a "struct + * vlog_module" for the current module, as set up by e.g. the + * VLOG_DEFINE_MODULE macro above. + * + * Guaranteed to preserve errno. + */ +#define VLOG_FATAL(...) vlog_fatal(THIS_MODULE, __VA_ARGS__) +#define VLOG_ABORT(...) vlog_abort(THIS_MODULE, __VA_ARGS__) +#define VLOG_EMER(...) VLOG(VLL_EMER, __VA_ARGS__) +#define VLOG_ERR(...) VLOG(VLL_ERR, __VA_ARGS__) +#define VLOG_WARN(...) VLOG(VLL_WARN, __VA_ARGS__) +#define VLOG_INFO(...) VLOG(VLL_INFO, __VA_ARGS__) +#define VLOG_DBG(...) VLOG(VLL_DBG, __VA_ARGS__) + +/* More convenience macros, for testing whether a given level is enabled in + * THIS_MODULE. When constructing a log message is expensive, this enables it + * to be skipped. */ +#define VLOG_IS_ERR_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_ERR) +#define VLOG_IS_WARN_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_WARN) +#define VLOG_IS_INFO_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_INFO) +#define VLOG_IS_DBG_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_DBG) + +/* Convenience macros for rate-limiting. + * Guaranteed to preserve errno. + */ +#define VLOG_ERR_RL(RL, ...) VLOG_RL(RL, VLL_ERR, __VA_ARGS__) +#define VLOG_WARN_RL(RL, ...) VLOG_RL(RL, VLL_WARN, __VA_ARGS__) +#define VLOG_INFO_RL(RL, ...) VLOG_RL(RL, VLL_INFO, __VA_ARGS__) +#define VLOG_DBG_RL(RL, ...) VLOG_RL(RL, VLL_DBG, __VA_ARGS__) + +/* Convenience macros to additionally store log message in buffer + * Caller is responsible for freeing *ERRP afterwards */ +#define VLOG_ERR_BUF(ERRP, ...) VLOG_ERRP(ERRP, VLL_ERR, __VA_ARGS__) +#define VLOG_WARN_BUF(ERRP, ...) VLOG_ERRP(ERRP, VLL_WARN, __VA_ARGS__) + +#define VLOG_DROP_ERR(RL) vlog_should_drop(THIS_MODULE, VLL_ERR, RL) +#define VLOG_DROP_WARN(RL) vlog_should_drop(THIS_MODULE, VLL_WARN, RL) +#define VLOG_DROP_INFO(RL) vlog_should_drop(THIS_MODULE, VLL_INFO, RL) +#define VLOG_DROP_DBG(RL) vlog_should_drop(THIS_MODULE, VLL_DBG, RL) + +/* Macros for logging at most once per execution. */ +#define VLOG_ERR_ONCE(...) VLOG_ONCE(VLL_ERR, __VA_ARGS__) +#define VLOG_WARN_ONCE(...) VLOG_ONCE(VLL_WARN, __VA_ARGS__) +#define VLOG_INFO_ONCE(...) VLOG_ONCE(VLL_INFO, __VA_ARGS__) +#define VLOG_DBG_ONCE(...) VLOG_ONCE(VLL_DBG, __VA_ARGS__) + +/* Command line processing. */ +#define VLOG_OPTION_ENUMS \ + OPT_LOG_FILE, \ + OPT_SYSLOG_TARGET + +#define VLOG_LONG_OPTIONS \ + {"verbose", optional_argument, NULL, 'v'}, \ + {"log-file", optional_argument, NULL, OPT_LOG_FILE}, \ + {"syslog-target", optional_argument, NULL, OPT_SYSLOG_TARGET} + +#define VLOG_OPTION_HANDLERS \ + case 'v': \ + vlog_set_verbosity(optarg); \ + break; \ + case OPT_LOG_FILE: \ + vlog_set_log_file(optarg); \ + break; \ + case OPT_SYSLOG_TARGET: \ + vlog_set_syslog_target(optarg); \ + break; + +void vlog_usage(void); + +/* Implementation details. */ +#define VLOG(LEVEL, ...) \ + do { \ + enum vlog_level level__ = LEVEL; \ + if (THIS_MODULE->min_level >= level__) { \ + vlog(THIS_MODULE, level__, __VA_ARGS__); \ + } \ + } while (0) +#define VLOG_RL(RL, LEVEL, ...) \ + do { \ + enum vlog_level level__ = LEVEL; \ + if (THIS_MODULE->min_level >= level__) { \ + vlog_rate_limit(THIS_MODULE, level__, RL, __VA_ARGS__); \ + } \ + } while (0) +#define VLOG_ONCE(LEVEL, ...) \ + do { \ + static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; \ + if (ovsthread_once_start(&once)) { \ + vlog(THIS_MODULE, LEVEL, __VA_ARGS__); \ + ovsthread_once_done(&once); \ + } \ + } while (0) +#define VLOG_ERRP(ERRP, LEVEL, ...) \ + do { \ + VLOG(LEVEL, __VA_ARGS__); \ + if (ERRP) { \ + *(ERRP) = xasprintf(__VA_ARGS__); \ + } \ + } while (0) + +#define VLOG_DEFINE_MODULE__(MODULE) \ + extern struct vlog_module VLM_##MODULE; \ + struct vlog_module VLM_##MODULE = \ + { \ + LIST_INITIALIZER(&VLM_##MODULE.list), \ + #MODULE, /* name */ \ + { VLL_INFO, VLL_INFO, VLL_INFO }, /* levels */ \ + VLL_INFO, /* min_level */ \ + true /* honor_rate_limits */ \ + }; + +#ifdef __cplusplus +} +#endif + +#endif /* vlog.h */ diff --git a/lib/automake.mk b/lib/automake.mk index b2001eb..6b99a0b 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -264,7 +264,6 @@ lib_libopenvswitch_la_SOURCES = \ lib/vlandev.c \ lib/vlandev.h \ lib/vlog.c \ - lib/vlog.h \ lib/vswitch-idl.c \ lib/vswitch-idl.h \ lib/vtep-idl.c \ diff --git a/lib/backtrace.c b/lib/backtrace.c index 9b7c52b..5cb2954 100644 --- a/lib/backtrace.c +++ b/lib/backtrace.c @@ -18,7 +18,7 @@ #include <inttypes.h> #include "backtrace.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(backtrace); diff --git a/lib/bfd.c b/lib/bfd.c index 7f6bf5b..3db1d57 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -44,7 +44,7 @@ #include "unaligned.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(bfd); diff --git a/lib/bundle.c b/lib/bundle.c index 700969b..e66ceed 100644 --- a/lib/bundle.c +++ b/lib/bundle.c @@ -29,7 +29,7 @@ #include "ofp-errors.h" #include "ofp-util.h" #include "openflow/nicira-ext.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(bundle); diff --git a/lib/cfm.c b/lib/cfm.c index bc8be71..23c1c6f 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -36,7 +36,7 @@ #include "timer.h" #include "timeval.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(cfm); diff --git a/lib/classifier.c b/lib/classifier.c index 1985efe..bbc5a4a 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -25,7 +25,7 @@ #include "ofp-util.h" #include "packets.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(classifier); diff --git a/lib/command-line.c b/lib/command-line.c index eb0a83b..2eccdc6 100644 --- a/lib/command-line.c +++ b/lib/command-line.c @@ -22,7 +22,7 @@ #include "dynamic-string.h" #include "ovs-thread.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(command_line); diff --git a/lib/coverage.c b/lib/coverage.c index fe97d69..6121956 100644 --- a/lib/coverage.c +++ b/lib/coverage.c @@ -24,7 +24,7 @@ #include "timeval.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(coverage); diff --git a/lib/daemon-unix.c b/lib/daemon-unix.c index 3d08222..3b24fca 100644 --- a/lib/daemon-unix.c +++ b/lib/daemon-unix.c @@ -35,7 +35,7 @@ #include "socket-util.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(daemon_unix); diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c index 3d1907e..cb205ca 100644 --- a/lib/daemon-windows.c +++ b/lib/daemon-windows.c @@ -20,7 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include "poll-loop.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(daemon_windows); diff --git a/lib/daemon.c b/lib/daemon.c index 4c7c8e1..4ac32b8 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -19,7 +19,9 @@ #include <errno.h> #include <fcntl.h> #include <unistd.h> -#include "vlog.h" +#include "util.h" +#include "ovs-thread.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(daemon); diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 3194351..a0e508c 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -66,7 +66,7 @@ #include "tnl-arp-cache.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(dpif_netdev); diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index 3545290..14bb1a4 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -53,7 +53,7 @@ #include "timeval.h" #include "unaligned.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(dpif_netlink); #ifdef _WIN32 diff --git a/lib/dpif.c b/lib/dpif.c index 50a7cc1..d740521 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -47,7 +47,7 @@ #include "tnl-ports.h" #include "util.h" #include "valgrind.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(dpif); diff --git a/lib/entropy.c b/lib/entropy.c index f980855..05cc648 100644 --- a/lib/entropy.c +++ b/lib/entropy.c @@ -23,9 +23,9 @@ #ifdef _WIN32 #include <Wincrypt.h> #endif - +#include "util.h" #include "socket-util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(entropy); diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index 199cf6b..62acea0 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -30,7 +30,7 @@ #include "signals.h" #include "socket-util.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "type-props.h" diff --git a/lib/getopt_long.c b/lib/getopt_long.c index 95c8104..0663762 100644 --- a/lib/getopt_long.c +++ b/lib/getopt_long.c @@ -33,7 +33,7 @@ #include <stdlib.h> #include <string.h> #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(getopt_long); diff --git a/lib/getrusage-windows.c b/lib/getrusage-windows.c index 0282a17..915725e 100644 --- a/lib/getrusage-windows.c +++ b/lib/getrusage-windows.c @@ -20,7 +20,7 @@ #include <sys/resource.h> #include <time.h> #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(getrusage_windows); diff --git a/lib/hmap.c b/lib/hmap.c index 542d8b5..938dbc2 100644 --- a/lib/hmap.c +++ b/lib/hmap.c @@ -21,7 +21,7 @@ #include "coverage.h" #include "random.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(hmap); diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index d571656..f15adca 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -31,7 +31,7 @@ #include "reconnect.h" #include "stream.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(jsonrpc); diff --git a/lib/lacp.c b/lib/lacp.c index 46d5bfb..f7c666a 100644 --- a/lib/lacp.c +++ b/lib/lacp.c @@ -30,7 +30,7 @@ #include "timer.h" #include "timeval.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(lacp); diff --git a/lib/learning-switch.c b/lib/learning-switch.c index af72ae1..b948af7 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -42,7 +42,7 @@ #include "simap.h" #include "timeval.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(learning_switch); diff --git a/lib/lockfile.c b/lib/lockfile.c index 1ef6251..26aee33 100644 --- a/lib/lockfile.c +++ b/lib/lockfile.c @@ -30,7 +30,7 @@ #include "ovs-thread.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(lockfile); diff --git a/lib/mcast-snooping.c b/lib/mcast-snooping.c index d99f01c..e84efc6 100644 --- a/lib/mcast-snooping.c +++ b/lib/mcast-snooping.c @@ -33,7 +33,7 @@ #include "unaligned.h" #include "util.h" #include "vlan-bitmap.h" -#include "vlog.h" +#include "openvswitch/vlog.h" COVERAGE_DEFINE(mcast_snooping_learned); COVERAGE_DEFINE(mcast_snooping_expired); diff --git a/lib/memory.c b/lib/memory.c index 6c97e19..3e21eb5 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -24,7 +24,7 @@ #include "simap.h" #include "timeval.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(memory); diff --git a/lib/meta-flow.c b/lib/meta-flow.c index 9aa71a3..90dd27c 100644 --- a/lib/meta-flow.c +++ b/lib/meta-flow.c @@ -35,7 +35,7 @@ #include "socket-util.h" #include "unaligned.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(meta_flow); diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index 473c0f6..a10b529 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -61,7 +61,7 @@ #include "socket-util.h" #include "svec.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netdev_bsd); diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 53fdb8e..275b6c8 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -46,7 +46,7 @@ #include "unaligned.h" #include "timeval.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(dpdk); static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20); diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index b794b10..0f1480f 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -40,7 +40,7 @@ #include "timeval.h" #include "unixctl.h" #include "reconnect.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netdev_dummy); diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 99425f7..a1e4979 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -71,7 +71,7 @@ #include "sset.h" #include "timer.h" #include "unaligned.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netdev_linux); diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index e6b97fa..91acabb 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -44,7 +44,7 @@ #include "route-table.h" #include "shash.h" #include "socket-util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "unaligned.h" #include "unixctl.h" #include "util.h" diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index 465f0c5..c67aaeb 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -28,7 +28,7 @@ #include "poll-loop.h" #include "shash.h" #include "svec.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "odp-netlink.h" #include "netlink-socket.h" #include "netlink.h" diff --git a/lib/netdev.c b/lib/netdev.c index 4a9c0f5..2bda77f 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -42,7 +42,7 @@ #include "smap.h" #include "sset.h" #include "svec.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netdev); diff --git a/lib/netlink-notifier.c b/lib/netlink-notifier.c index 713082d..45c9188 100644 --- a/lib/netlink-notifier.c +++ b/lib/netlink-notifier.c @@ -26,7 +26,7 @@ #include "netlink.h" #include "netlink-socket.h" #include "ofpbuf.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netlink_notifier); diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 2e02c43..e4f153f 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -35,7 +35,7 @@ #include "seq.h" #include "socket-util.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netlink_socket); diff --git a/lib/netlink.c b/lib/netlink.c index 24b2168..b6f7d45 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -26,7 +26,7 @@ #include "ofpbuf.h" #include "timeval.h" #include "unaligned.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netlink); diff --git a/lib/nx-match.c b/lib/nx-match.c index 72fa29b..2ad3cf2 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -33,7 +33,7 @@ #include "shash.h" #include "unaligned.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(nx_match); diff --git a/lib/odp-util.c b/lib/odp-util.c index a89d5f8..b8fda49 100644 --- a/lib/odp-util.c +++ b/lib/odp-util.c @@ -37,7 +37,7 @@ #include "timeval.h" #include "unaligned.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(odp_util); diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 1b7625d..4680d81 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -30,7 +30,7 @@ #include "ofpbuf.h" #include "unaligned.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofp_actions); diff --git a/lib/ofp-errors.c b/lib/ofp-errors.c index c803494..ce85f67 100644 --- a/lib/ofp-errors.c +++ b/lib/ofp-errors.c @@ -23,7 +23,7 @@ #include "ofp-util.h" #include "ofpbuf.h" #include "openflow/openflow.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofp_errors); diff --git a/lib/ofp-msgs.c b/lib/ofp-msgs.c index 4dfc657..364ce76 100644 --- a/lib/ofp-msgs.c +++ b/lib/ofp-msgs.c @@ -24,7 +24,7 @@ #include "openflow/nicira-ext.h" #include "openflow/openflow.h" #include "ovs-thread.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofp_msgs); diff --git a/lib/ofp-util.c b/lib/ofp-util.c index b32234a..986659e 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -42,7 +42,7 @@ #include "random.h" #include "unaligned.h" #include "type-props.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "bitmap.h" VLOG_DEFINE_THIS_MODULE(ofp_util); diff --git a/lib/ovs-numa.c b/lib/ovs-numa.c index 07cbc7b..dabdd18 100644 --- a/lib/ovs-numa.c +++ b/lib/ovs-numa.c @@ -32,7 +32,7 @@ #include "hmap.h" #include "list.h" #include "ovs-thread.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovs_numa); diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c index 1cf69ae..5276981 100644 --- a/lib/ovs-rcu.c +++ b/lib/ovs-rcu.c @@ -22,7 +22,7 @@ #include "poll-loop.h" #include "seq.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovs_rcu); diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index 1f346b9..c11308b 100644 --- a/lib/ovs-thread.c +++ b/lib/ovs-thread.c @@ -25,6 +25,7 @@ #include <unistd.h> #include "compiler.h" #include "hash.h" +#include "list.h" #include "netdev-dpdk.h" #include "ovs-rcu.h" #include "poll-loop.h" @@ -38,7 +39,7 @@ * cut-and-paste. Since "sparse" is just a checker, not a compiler, it * doesn't matter that we don't define them. */ #else -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovs_thread); diff --git a/lib/ovsdb-error.c b/lib/ovsdb-error.c index eb9f1ee..8be4d16 100644 --- a/lib/ovsdb-error.c +++ b/lib/ovsdb-error.c @@ -23,7 +23,7 @@ #include "dynamic-string.h" #include "json.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_error); diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index e1857b6..9c25dbc 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -34,7 +34,7 @@ #include "poll-loop.h" #include "shash.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_idl); diff --git a/lib/pcap-file.c b/lib/pcap-file.c index 191e690..58c60b1 100644 --- a/lib/pcap-file.c +++ b/lib/pcap-file.c @@ -29,7 +29,7 @@ #include "packets.h" #include "timeval.h" #include "unaligned.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(pcap); diff --git a/lib/poll-loop.c b/lib/poll-loop.c index 8747c61..3c4b55c 100644 --- a/lib/poll-loop.c +++ b/lib/poll-loop.c @@ -29,7 +29,7 @@ #include "seq.h" #include "socket-util.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "hmap.h" #include "hash.h" diff --git a/lib/process.c b/lib/process.c index 93a99ab..b8910d9 100644 --- a/lib/process.c +++ b/lib/process.c @@ -34,7 +34,7 @@ #include "signals.h" #include "socket-util.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(process); diff --git a/lib/rconn.c b/lib/rconn.c index 9d8c46f..8e07b8e 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -30,7 +30,7 @@ #include "timeval.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(rconn); diff --git a/lib/reconnect.c b/lib/reconnect.c index 5296c5c..bab821e 100644 --- a/lib/reconnect.c +++ b/lib/reconnect.c @@ -20,7 +20,7 @@ #include <stdlib.h> #include "poll-loop.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(reconnect); diff --git a/lib/route-table.c b/lib/route-table.c index a1bc887..1172636 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -32,7 +32,7 @@ #include "ovs-router.h" #include "ovs-router-linux.h" #include "rtnetlink-link.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(route_table); diff --git a/lib/rstp-state-machines.c b/lib/rstp-state-machines.c index df357a7..3202018 100644 --- a/lib/rstp-state-machines.c +++ b/lib/rstp-state-machines.c @@ -42,7 +42,7 @@ #include "seq.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(rstp_sm); diff --git a/lib/rstp.c b/lib/rstp.c index 022fc3c..c1acd52 100644 --- a/lib/rstp.c +++ b/lib/rstp.c @@ -44,7 +44,7 @@ #include "seq.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(rstp); diff --git a/lib/rtbsd.c b/lib/rtbsd.c index 46a0632..33855a6 100644 --- a/lib/rtbsd.c +++ b/lib/rtbsd.c @@ -26,7 +26,7 @@ #include "coverage.h" #include "socket-util.h" #include "poll-loop.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "rtbsd.h" VLOG_DEFINE_THIS_MODULE(rtbsd); diff --git a/lib/signals.c b/lib/signals.c index 85e5c79..3af6187 100644 --- a/lib/signals.c +++ b/lib/signals.c @@ -25,7 +25,7 @@ #include "socket-util.h" #include "type-props.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(signals); diff --git a/lib/socket-util-unix.c b/lib/socket-util-unix.c index c56654e..afab195 100644 --- a/lib/socket-util-unix.c +++ b/lib/socket-util-unix.c @@ -28,7 +28,7 @@ #include "fatal-signal.h" #include "random.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(socket_util_unix); diff --git a/lib/socket-util.c b/lib/socket-util.c index 755ce4e..8949da7 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -37,7 +37,7 @@ #include "packets.h" #include "poll-loop.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #ifdef __linux__ #include <linux/if_packet.h> #endif diff --git a/lib/stp.c b/lib/stp.c index 5854afa..0fd9386 100644 --- a/lib/stp.c +++ b/lib/stp.c @@ -28,11 +28,12 @@ #include "byte-order.h" #include "connectivity.h" #include "ofpbuf.h" +#include "ovs-atomic.h" #include "packets.h" #include "seq.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stp); diff --git a/lib/stream-fd.c b/lib/stream-fd.c index 1b80701..a6a10d4 100644 --- a/lib/stream-fd.c +++ b/lib/stream-fd.c @@ -29,7 +29,7 @@ #include "util.h" #include "stream-provider.h" #include "stream.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stream_fd); diff --git a/lib/stream-nossl.c b/lib/stream-nossl.c index 9dda987..26fcc97 100644 --- a/lib/stream-nossl.c +++ b/lib/stream-nossl.c @@ -16,7 +16,7 @@ #include <config.h> #include "stream-ssl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stream_nossl); diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 353f171..47c5312 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -45,7 +45,7 @@ #include "stream-provider.h" #include "stream.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #ifdef _WIN32 /* Ref: https://www.openssl.org/support/faq.html#PROG2 diff --git a/lib/stream-tcp.c b/lib/stream-tcp.c index e58c5ad..3e19dbbb 100644 --- a/lib/stream-tcp.c +++ b/lib/stream-tcp.c @@ -31,7 +31,7 @@ #include "util.h" #include "stream-provider.h" #include "stream-fd.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stream_tcp); diff --git a/lib/stream-unix.c b/lib/stream-unix.c index 29077c6..daade3f 100644 --- a/lib/stream-unix.c +++ b/lib/stream-unix.c @@ -33,7 +33,7 @@ #include "util.h" #include "stream-provider.h" #include "stream-fd.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stream_unix); diff --git a/lib/stream.c b/lib/stream.c index 4e512da..ca469fb 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -37,7 +37,7 @@ #include "random.h" #include "socket-util.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(stream); diff --git a/lib/svec.c b/lib/svec.c index d083ebb..7fe8beb 100644 --- a/lib/svec.c +++ b/lib/svec.c @@ -21,7 +21,7 @@ #include <string.h> #include "dynamic-string.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(svec); diff --git a/lib/timeval.c b/lib/timeval.c index 99f9b94..6173aff 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -37,7 +37,7 @@ #include "seq.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(timeval); diff --git a/lib/tnl-arp-cache.c b/lib/tnl-arp-cache.c index 76195ec..59ec0bc 100644 --- a/lib/tnl-arp-cache.c +++ b/lib/tnl-arp-cache.c @@ -36,7 +36,7 @@ #include "unaligned.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" /* In seconds */ diff --git a/lib/unixctl.c b/lib/unixctl.c index 9fb2e85..b47f35a 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -29,7 +29,7 @@ #include "stream.h" #include "stream-provider.h" #include "svec.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(unixctl); diff --git a/lib/util.c b/lib/util.c index 453ade6..6b51fa8 100644 --- a/lib/util.c +++ b/lib/util.c @@ -33,7 +33,7 @@ #include "ovs-rcu.h" #include "ovs-thread.h" #include "socket-util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #ifdef HAVE_PTHREAD_SET_NAME_NP #include <pthread_np.h> #endif diff --git a/lib/vconn-stream.c b/lib/vconn-stream.c index 9347b5e..32c25cd 100644 --- a/lib/vconn-stream.c +++ b/lib/vconn-stream.c @@ -30,7 +30,7 @@ #include "util.h" #include "vconn-provider.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(vconn_stream); diff --git a/lib/vconn.c b/lib/vconn.c index 97e8dd2..2ffbd8d 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -37,7 +37,7 @@ #include "poll-loop.h" #include "random.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "socket-util.h" VLOG_DEFINE_THIS_MODULE(vconn); diff --git a/lib/vlandev.c b/lib/vlandev.c index d2f5a37..99c99de 100644 --- a/lib/vlandev.c +++ b/lib/vlandev.c @@ -27,7 +27,7 @@ #include "hash.h" #include "shash.h" #include "socket-util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(vlandev); diff --git a/lib/vlog.c b/lib/vlog.c index 639dc91..bacdfb0 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -15,7 +15,7 @@ */ #include <config.h> -#include "vlog.h" +#include "openvswitch/vlog.h" #include <assert.h> #include <ctype.h> #include <errno.h> @@ -170,6 +170,11 @@ vlog_get_facility_val(const char *name) return i; } +void vlog_insert_module(struct ovs_list *vlog) +{ + list_insert(&vlog_modules, vlog); +} + /* Returns the name for logging module 'module'. */ const char * vlog_get_module_name(const struct vlog_module *module) diff --git a/lib/vlog.h b/lib/vlog.h deleted file mode 100644 index 41b0adc..0000000 --- a/lib/vlog.h +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef VLOG_H -#define VLOG_H 1 - -/* Logging. - * - * - * Thread-safety - * ============= - * - * Fully thread safe. - */ - -#include <limits.h> -#include <stdarg.h> -#include <stdbool.h> -#include <time.h> -#include "compiler.h" -#include "ovs-thread.h" -#include "sat-math.h" -#include "openvswitch/token-bucket.h" -#include "util.h" -#include "list.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Logging severity levels. - * - * ovs-appctl(8) defines each of the log levels. */ -#define VLOG_LEVELS \ - VLOG_LEVEL(OFF, LOG_ALERT, 1) \ - VLOG_LEVEL(EMER, LOG_ALERT, 1) \ - VLOG_LEVEL(ERR, LOG_ERR, 3) \ - VLOG_LEVEL(WARN, LOG_WARNING, 4) \ - VLOG_LEVEL(INFO, LOG_NOTICE, 5) \ - VLOG_LEVEL(DBG, LOG_DEBUG, 7) -enum vlog_level { -#define VLOG_LEVEL(NAME, SYSLOG_LEVEL, RFC5424_LEVEL) VLL_##NAME, - VLOG_LEVELS -#undef VLOG_LEVEL - VLL_N_LEVELS -}; - -const char *vlog_get_level_name(enum vlog_level); -enum vlog_level vlog_get_level_val(const char *name); - -/* Facilities that we can log to. */ -#define VLOG_FACILITIES \ - VLOG_FACILITY(SYSLOG, "ovs|%05N|%c%T|%p|%m") \ - VLOG_FACILITY(CONSOLE, "%D{%Y-%m-%dT%H:%M:%SZ}|%05N|%c%T|%p|%m") \ - VLOG_FACILITY(FILE, "%D{%Y-%m-%dT%H:%M:%S.###Z}|%05N|%c%T|%p|%m") -enum vlog_facility { -#define VLOG_FACILITY(NAME, PATTERN) VLF_##NAME, - VLOG_FACILITIES -#undef VLOG_FACILITY - VLF_N_FACILITIES, - VLF_ANY_FACILITY = -1 -}; - -const char *vlog_get_facility_name(enum vlog_facility); -enum vlog_facility vlog_get_facility_val(const char *name); - -/* A log module. */ -struct vlog_module { - struct ovs_list list; - const char *name; /* User-visible name. */ - int levels[VLF_N_FACILITIES]; /* Minimum log level for each facility. */ - int min_level; /* Minimum log level for any facility. */ - bool honor_rate_limits; /* Set false to ignore rate limits. */ -}; - -/* Global list of all logging modules */ -extern struct ovs_list vlog_modules; - -/* Creates and initializes a global instance of a module named MODULE. */ -#define VLOG_DEFINE_MODULE(MODULE) \ - VLOG_DEFINE_MODULE__(MODULE) \ - OVS_CONSTRUCTOR(init_##MODULE) { \ - list_insert(&vlog_modules, &VLM_##MODULE.list); \ - } \ - -const char *vlog_get_module_name(const struct vlog_module *); -struct vlog_module *vlog_module_from_name(const char *name); - -/* Rate-limiter for log messages. */ -struct vlog_rate_limit { - struct token_bucket token_bucket; - time_t first_dropped; /* Time first message was dropped. */ - time_t last_dropped; /* Time of most recent message drop. */ - unsigned int n_dropped; /* Number of messages dropped. */ - struct ovs_mutex mutex; /* Mutual exclusion for rate limit. */ -}; - -/* Number of tokens to emit a message. We add 'rate' tokens per millisecond, - * thus 60,000 tokens are required to emit one message per minute. */ -#define VLOG_MSG_TOKENS (60 * 1000) - -/* Initializer for a struct vlog_rate_limit, to set up a maximum rate of RATE - * messages per minute and a maximum burst size of BURST messages. */ -#define VLOG_RATE_LIMIT_INIT(RATE, BURST) \ - { \ - TOKEN_BUCKET_INIT(RATE, OVS_SAT_MUL(BURST, VLOG_MSG_TOKENS)),\ - 0, /* first_dropped */ \ - 0, /* last_dropped */ \ - 0, /* n_dropped */ \ - OVS_MUTEX_INITIALIZER /* mutex */ \ - } - -/* Configuring how each module logs messages. */ -enum vlog_level vlog_get_level(const struct vlog_module *, enum vlog_facility); -void vlog_set_levels(struct vlog_module *, - enum vlog_facility, enum vlog_level); -char *vlog_set_levels_from_string(const char *) OVS_WARN_UNUSED_RESULT; -void vlog_set_levels_from_string_assert(const char *); -char *vlog_get_levels(void); -bool vlog_is_enabled(const struct vlog_module *, enum vlog_level); -bool vlog_should_drop(const struct vlog_module *, enum vlog_level, - struct vlog_rate_limit *); -void vlog_set_verbosity(const char *arg); - -/* Configuring log facilities. */ -void vlog_set_pattern(enum vlog_facility, const char *pattern); -int vlog_set_log_file(const char *file_name); -int vlog_reopen_log_file(void); - -/* Configure syslog target. */ -void vlog_set_syslog_target(const char *target); - -/* Initialization. */ -void vlog_init(void); -void vlog_enable_async(void); - -/* Functions for actual logging. */ -void vlog(const struct vlog_module *, enum vlog_level, const char *format, ...) - OVS_PRINTF_FORMAT (3, 4); -void vlog_valist(const struct vlog_module *, enum vlog_level, - const char *, va_list) - OVS_PRINTF_FORMAT (3, 0); - -OVS_NO_RETURN void vlog_fatal(const struct vlog_module *, const char *format, ...) - OVS_PRINTF_FORMAT (2, 3); -OVS_NO_RETURN void vlog_fatal_valist(const struct vlog_module *, - const char *format, va_list) - OVS_PRINTF_FORMAT (2, 0); - -OVS_NO_RETURN void vlog_abort(const struct vlog_module *, const char *format, ...) - OVS_PRINTF_FORMAT (2, 3); -OVS_NO_RETURN void vlog_abort_valist(const struct vlog_module *, - const char *format, va_list) - OVS_PRINTF_FORMAT (2, 0); - -void vlog_rate_limit(const struct vlog_module *, enum vlog_level, - struct vlog_rate_limit *, const char *, ...) - OVS_PRINTF_FORMAT (4, 5); - -/* Creates and initializes a global instance of a module named MODULE, and - * defines a static variable named THIS_MODULE that points to it, for use with - * the convenience macros below. */ -#define VLOG_DEFINE_THIS_MODULE(MODULE) \ - VLOG_DEFINE_MODULE(MODULE); \ - static struct vlog_module *const THIS_MODULE = &VLM_##MODULE - -/* Convenience macros. These assume that THIS_MODULE points to a "struct - * vlog_module" for the current module, as set up by e.g. the - * VLOG_DEFINE_MODULE macro above. - * - * Guaranteed to preserve errno. - */ -#define VLOG_FATAL(...) vlog_fatal(THIS_MODULE, __VA_ARGS__) -#define VLOG_ABORT(...) vlog_abort(THIS_MODULE, __VA_ARGS__) -#define VLOG_EMER(...) VLOG(VLL_EMER, __VA_ARGS__) -#define VLOG_ERR(...) VLOG(VLL_ERR, __VA_ARGS__) -#define VLOG_WARN(...) VLOG(VLL_WARN, __VA_ARGS__) -#define VLOG_INFO(...) VLOG(VLL_INFO, __VA_ARGS__) -#define VLOG_DBG(...) VLOG(VLL_DBG, __VA_ARGS__) - -/* More convenience macros, for testing whether a given level is enabled in - * THIS_MODULE. When constructing a log message is expensive, this enables it - * to be skipped. */ -#define VLOG_IS_ERR_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_ERR) -#define VLOG_IS_WARN_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_WARN) -#define VLOG_IS_INFO_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_INFO) -#define VLOG_IS_DBG_ENABLED() vlog_is_enabled(THIS_MODULE, VLL_DBG) - -/* Convenience macros for rate-limiting. - * Guaranteed to preserve errno. - */ -#define VLOG_ERR_RL(RL, ...) VLOG_RL(RL, VLL_ERR, __VA_ARGS__) -#define VLOG_WARN_RL(RL, ...) VLOG_RL(RL, VLL_WARN, __VA_ARGS__) -#define VLOG_INFO_RL(RL, ...) VLOG_RL(RL, VLL_INFO, __VA_ARGS__) -#define VLOG_DBG_RL(RL, ...) VLOG_RL(RL, VLL_DBG, __VA_ARGS__) - -/* Convenience macros to additionally store log message in buffer - * Caller is responsible for freeing *ERRP afterwards */ -#define VLOG_ERR_BUF(ERRP, ...) VLOG_ERRP(ERRP, VLL_ERR, __VA_ARGS__) -#define VLOG_WARN_BUF(ERRP, ...) VLOG_ERRP(ERRP, VLL_WARN, __VA_ARGS__) - -#define VLOG_DROP_ERR(RL) vlog_should_drop(THIS_MODULE, VLL_ERR, RL) -#define VLOG_DROP_WARN(RL) vlog_should_drop(THIS_MODULE, VLL_WARN, RL) -#define VLOG_DROP_INFO(RL) vlog_should_drop(THIS_MODULE, VLL_INFO, RL) -#define VLOG_DROP_DBG(RL) vlog_should_drop(THIS_MODULE, VLL_DBG, RL) - -/* Macros for logging at most once per execution. */ -#define VLOG_ERR_ONCE(...) VLOG_ONCE(VLL_ERR, __VA_ARGS__) -#define VLOG_WARN_ONCE(...) VLOG_ONCE(VLL_WARN, __VA_ARGS__) -#define VLOG_INFO_ONCE(...) VLOG_ONCE(VLL_INFO, __VA_ARGS__) -#define VLOG_DBG_ONCE(...) VLOG_ONCE(VLL_DBG, __VA_ARGS__) - -/* Command line processing. */ -#define VLOG_OPTION_ENUMS \ - OPT_LOG_FILE, \ - OPT_SYSLOG_TARGET - -#define VLOG_LONG_OPTIONS \ - {"verbose", optional_argument, NULL, 'v'}, \ - {"log-file", optional_argument, NULL, OPT_LOG_FILE}, \ - {"syslog-target", optional_argument, NULL, OPT_SYSLOG_TARGET} - -#define VLOG_OPTION_HANDLERS \ - case 'v': \ - vlog_set_verbosity(optarg); \ - break; \ - case OPT_LOG_FILE: \ - vlog_set_log_file(optarg); \ - break; \ - case OPT_SYSLOG_TARGET: \ - vlog_set_syslog_target(optarg); \ - break; - -void vlog_usage(void); - -/* Implementation details. */ -#define VLOG(LEVEL, ...) \ - do { \ - enum vlog_level level__ = LEVEL; \ - if (THIS_MODULE->min_level >= level__) { \ - vlog(THIS_MODULE, level__, __VA_ARGS__); \ - } \ - } while (0) -#define VLOG_RL(RL, LEVEL, ...) \ - do { \ - enum vlog_level level__ = LEVEL; \ - if (THIS_MODULE->min_level >= level__) { \ - vlog_rate_limit(THIS_MODULE, level__, RL, __VA_ARGS__); \ - } \ - } while (0) -#define VLOG_ONCE(LEVEL, ...) \ - do { \ - static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; \ - if (ovsthread_once_start(&once)) { \ - vlog(THIS_MODULE, LEVEL, __VA_ARGS__); \ - ovsthread_once_done(&once); \ - } \ - } while (0) -#define VLOG_ERRP(ERRP, LEVEL, ...) \ - do { \ - VLOG(LEVEL, __VA_ARGS__); \ - if (ERRP) { \ - *(ERRP) = xasprintf(__VA_ARGS__); \ - } \ - } while (0) - -#define VLOG_DEFINE_MODULE__(MODULE) \ - extern struct vlog_module VLM_##MODULE; \ - struct vlog_module VLM_##MODULE = \ - { \ - LIST_INITIALIZER(&VLM_##MODULE.list), \ - #MODULE, /* name */ \ - { VLL_INFO, VLL_INFO, VLL_INFO }, /* levels */ \ - VLL_INFO, /* min_level */ \ - true /* honor_rate_limits */ \ - }; - -#ifdef __cplusplus -} -#endif - - -#endif /* vlog.h */ diff --git a/ofproto/bond.c b/ofproto/bond.c index 72611ae..c4b3a3a 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -45,7 +45,7 @@ #include "shash.h" #include "timeval.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(bond); diff --git a/ofproto/bundles.c b/ofproto/bundles.c index 001ad14..c33af52 100644 --- a/ofproto/bundles.c +++ b/ofproto/bundles.c @@ -35,7 +35,7 @@ #include "stream.h" #include "timeval.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "bundles.h" diff --git a/ofproto/collectors.c b/ofproto/collectors.c index 4501d2b..770151c 100644 --- a/ofproto/collectors.c +++ b/ofproto/collectors.c @@ -26,7 +26,7 @@ #include "socket-util.h" #include "sset.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(collectors); diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index a81dd4f..b112d41 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -40,7 +40,7 @@ #include "stream.h" #include "timeval.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "bundles.h" diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c index b29e5af..2aacc13 100644 --- a/ofproto/fail-open.c +++ b/ofproto/fail-open.c @@ -33,7 +33,7 @@ #include "rconn.h" #include "timeval.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(fail_open); diff --git a/ofproto/in-band.c b/ofproto/in-band.c index e25a27a..bde893a 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -37,7 +37,7 @@ #include "packets.h" #include "poll-loop.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(in_band); diff --git a/ofproto/netflow.c b/ofproto/netflow.c index 5b1c8fe..99bd6b8 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -33,7 +33,7 @@ #include "socket-util.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(netflow); diff --git a/ofproto/ofproto-dpif-ipfix.c b/ofproto/ofproto-dpif-ipfix.c index 33e9f3f..3ba6dce 100644 --- a/ofproto/ofproto-dpif-ipfix.c +++ b/ofproto/ofproto-dpif-ipfix.c @@ -32,7 +32,7 @@ #include "util.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ipfix); diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c index fcc7758..e0f3dcd 100644 --- a/ofproto/ofproto-dpif-mirror.c +++ b/ofproto/ofproto-dpif-mirror.c @@ -22,7 +22,7 @@ #include "hmapx.h" #include "ofproto.h" #include "vlan-bitmap.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofproto_dpif_mirror); diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c index 94c6711..9fa687d 100644 --- a/ofproto/ofproto-dpif-monitor.c +++ b/ofproto/ofproto-dpif-monitor.c @@ -33,7 +33,7 @@ #include "seq.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofproto_dpif_monitor); diff --git a/ofproto/ofproto-dpif-sflow.c b/ofproto/ofproto-dpif-sflow.c index 35667ca..539a293 100644 --- a/ofproto/ofproto-dpif-sflow.c +++ b/ofproto/ofproto-dpif-sflow.c @@ -37,7 +37,7 @@ #include "sflow_api.h" #include "socket-util.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "lib/odp-util.h" #include "ofproto-provider.h" #include "lacp.h" diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index dc6c344..042f300 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -38,7 +38,7 @@ #include "poll-loop.h" #include "seq.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #define MAX_QUEUE_LENGTH 512 #define UPCALL_MAX_BATCH 64 diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index e5401ed..d063322 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -56,7 +56,7 @@ #include "ovs-router.h" #include "tnl-ports.h" #include "tunnel.h" -#include "vlog.h" +#include "openvswitch/vlog.h" COVERAGE_DEFINE(xlate_actions); COVERAGE_DEFINE(xlate_actions_oversize); diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 6f93dc3..d90d325 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -68,7 +68,7 @@ #include "unaligned.h" #include "unixctl.h" #include "vlan-bitmap.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ofproto_dpif); diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 317d392..71b2260 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -57,7 +57,7 @@ #include "timeval.h" #include "unaligned.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "bundles.h" VLOG_DEFINE_THIS_MODULE(ofproto); diff --git a/ofproto/pktbuf.c b/ofproto/pktbuf.c index 38ec348..5ba8c51 100644 --- a/ofproto/pktbuf.c +++ b/ofproto/pktbuf.c @@ -24,7 +24,7 @@ #include "timeval.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(pktbuf); diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 769f533..d079a24 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -36,7 +36,7 @@ #include "tnl-arp-cache.h" #include "tnl-ports.h" #include "tunnel.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "unaligned.h" #include "ofproto-dpif.h" diff --git a/ovsdb/file.c b/ovsdb/file.c index 7c8ac6f..8c3c31b 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -35,7 +35,7 @@ #include "transaction.h" #include "uuid.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_file); diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index 989af3b..e406758 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -37,7 +37,7 @@ #include "timeval.h" #include "transaction.h" #include "trigger.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_jsonrpc_server); diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c index 2d4c4db..e3b08c7 100644 --- a/ovsdb/ovsdb-client.c +++ b/ovsdb/ovsdb-client.c @@ -47,7 +47,7 @@ #include "timeval.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_client); diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index faa7741..d5277b1 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -53,7 +53,7 @@ #include "trigger.h" #include "util.h" #include "unixctl.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(ovsdb_server); diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index a33969b..1711665 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -39,7 +39,7 @@ #include "table.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" /* -m, --more: Verbosity level for "show-log" command output. */ static int show_log_verbosity; diff --git a/tests/test-flows.c b/tests/test-flows.c index 63340c7..19e8315 100644 --- a/tests/test-flows.c +++ b/tests/test-flows.c @@ -30,7 +30,7 @@ #include "pcap-file.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static void test_flows_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c index fe7d869..2aad5c5 100644 --- a/tests/test-jsonrpc.c +++ b/tests/test-jsonrpc.c @@ -31,7 +31,7 @@ #include "stream.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" OVS_NO_RETURN static void usage(void); static void parse_options(int argc, char *argv[]); diff --git a/tests/test-lockfile.c b/tests/test-lockfile.c index 71ccbc6..d0c8dc4 100644 --- a/tests/test-lockfile.c +++ b/tests/test-lockfile.c @@ -26,7 +26,7 @@ #include "process.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" struct test { const char *name; diff --git a/tests/test-netflow.c b/tests/test-netflow.c index b1b7717..b918d15 100644 --- a/tests/test-netflow.c +++ b/tests/test-netflow.c @@ -32,7 +32,7 @@ #include "socket-util.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" OVS_NO_RETURN static void usage(void); static void parse_options(int argc, char *argv[]); diff --git a/tests/test-odp.c b/tests/test-odp.c index b38c2eb..48ad56a 100644 --- a/tests/test-odp.c +++ b/tests/test-odp.c @@ -25,7 +25,7 @@ #include "ofpbuf.h" #include "ovstest.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static int parse_keys(bool wc_keys) diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c index b113b9d..99f41c1 100644 --- a/tests/test-ovsdb.c +++ b/tests/test-ovsdb.c @@ -49,7 +49,7 @@ #include "tests/idltest.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" OVS_NO_RETURN static void usage(void); static void parse_options(int argc, char *argv[]); diff --git a/tests/test-reconnect.c b/tests/test-reconnect.c index 61f95a5..6e165a2 100644 --- a/tests/test-reconnect.c +++ b/tests/test-reconnect.c @@ -26,7 +26,7 @@ #include "ovstest.h" #include "svec.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static struct reconnect *reconnect; static int now; diff --git a/tests/test-rstp.c b/tests/test-rstp.c index c5e7a56..005423b 100644 --- a/tests/test-rstp.c +++ b/tests/test-rstp.c @@ -10,7 +10,7 @@ #include "ofpbuf.h" #include "ovstest.h" #include "packets.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #define MAX_PORTS 10 diff --git a/tests/test-sflow.c b/tests/test-sflow.c index 0bd5570..959cd6c 100644 --- a/tests/test-sflow.c +++ b/tests/test-sflow.c @@ -35,7 +35,7 @@ #include "socket-util.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" OVS_NO_RETURN static void usage(void); static void parse_options(int argc, char *argv[]); diff --git a/tests/test-stp.c b/tests/test-stp.c index 88a138d..6250c54 100644 --- a/tests/test-stp.c +++ b/tests/test-stp.c @@ -26,7 +26,7 @@ #include "ofpbuf.h" #include "ovstest.h" #include "packets.h" -#include "vlog.h" +#include "openvswitch/vlog.h" struct bpdu { int port_no; diff --git a/tests/test-util.c b/tests/test-util.c index 74bc5c4..2c985e7 100644 --- a/tests/test-util.c +++ b/tests/test-util.c @@ -27,7 +27,7 @@ #include "command-line.h" #include "ovstest.h" #include "random.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static void check_log_2_floor(uint32_t x, int n) diff --git a/tests/test-vconn.c b/tests/test-vconn.c index c786953..b5ba172 100644 --- a/tests/test-vconn.c +++ b/tests/test-vconn.c @@ -36,7 +36,7 @@ #include "stream-ssl.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" struct fake_pvconn { const char *type; diff --git a/utilities/nlmon.c b/utilities/nlmon.c index 99b060c..dc5d8c4 100644 --- a/utilities/nlmon.c +++ b/utilities/nlmon.c @@ -29,7 +29,7 @@ #include "poll-loop.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static const struct nl_policy rtnlgrp_link_policy[] = { [IFLA_IFNAME] = { .type = NL_A_STRING, .optional = false }, diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c index 943efc3..5c39a8f 100644 --- a/utilities/ovs-appctl.c +++ b/utilities/ovs-appctl.c @@ -31,7 +31,7 @@ #include "timeval.h" #include "unixctl.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static void usage(void); static const char *parse_command_line(int argc, char *argv[]); diff --git a/utilities/ovs-benchmark.c b/utilities/ovs-benchmark.c index 010d686..a092746 100644 --- a/utilities/ovs-benchmark.c +++ b/utilities/ovs-benchmark.c @@ -31,7 +31,7 @@ #include "socket-util.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #define DEFAULT_PORT 6630 diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index ef4550b..404a428 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -40,7 +40,7 @@ #include "packets.h" #include "timeval.h" #include "util.h" -#include "vlog.h" +#include "openvswitch/vlog.h" static struct dpctl_params dpctl_p; diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 5e6afae..1e349ea 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -60,7 +60,7 @@ #include "unixctl.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "meta-flow.h" #include "sort.h" diff --git a/utilities/ovs-testcontroller.c b/utilities/ovs-testcontroller.c index 5a5923b..2c75b41 100644 --- a/utilities/ovs-testcontroller.c +++ b/utilities/ovs-testcontroller.c @@ -41,7 +41,7 @@ #include "unixctl.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "socket-util.h" #include "ofp-util.h" diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 2c272ed..41d8f9b 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -48,7 +48,7 @@ #include "timeval.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(vsctl); diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 228ee91..4d84732 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -60,7 +60,7 @@ #include "vlandev.h" #include "lib/vswitch-idl.h" #include "xenserver.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "sflow_api.h" #include "vlan-bitmap.h" #include "packets.h" diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index 392e2c7..9e406c4 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -46,7 +46,7 @@ #include "unixctl.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" #include "lib/vswitch-idl.h" #include "lib/netdev-dpdk.h" diff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c index 42ac01a..b8a8855 100644 --- a/vswitchd/system-stats.c +++ b/vswitchd/system-stats.c @@ -42,7 +42,7 @@ #include "shash.h" #include "smap.h" #include "timeval.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(system_stats); diff --git a/vswitchd/xenserver.c b/vswitchd/xenserver.c index bc57f0e..a1a6231 100644 --- a/vswitchd/xenserver.c +++ b/vswitchd/xenserver.c @@ -23,7 +23,8 @@ #include <unistd.h> #include "dynamic-string.h" #include "process.h" -#include "vlog.h" +#include "util.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(xenserver); diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c index afc7f38..14de5b5 100644 --- a/vtep/vtep-ctl.c +++ b/vtep/vtep-ctl.c @@ -48,7 +48,7 @@ #include "timeval.h" #include "util.h" #include "vconn.h" -#include "vlog.h" +#include "openvswitch/vlog.h" VLOG_DEFINE_THIS_MODULE(vtep_ctl); -- 1.9.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev