ODP logs now end up in OVS logs.

Signed-off-by: Zoltan Kiss <[email protected]>
---
 lib/netdev-odp.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c
index fa325faa..765edee 100644
--- a/lib/netdev-odp.c
+++ b/lib/netdev-odp.c
@@ -635,6 +635,24 @@ out_stats:
     return ret;
 }
 
+int odp_override_log(odp_log_level_e level, const char *fmt, ...)
+{
+    va_list args;
+    enum vlog_level ovs_level;
+    if (level == ODP_LOG_DBG)
+        ovs_level = VLL_DBG;
+    else if (level == ODP_LOG_PRINT)
+        ovs_level = VLL_INFO;
+    else
+        ovs_level = VLL_ERR;
+
+    va_start(args, fmt);
+    vlog_rate_limit_valist(THIS_MODULE, ovs_level, &rl, fmt, args);
+    va_end(args);
+
+    return 0;
+}
+
 static struct netdev_class netdev_odp_class = {
     "odp",
     odp_class_init,             /* init */
-- 
1.9.1


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to