X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif.c;h=e117bdf9cd29e5b4906d83015d7182894d0417bd;hb=c0a56d9fe1fdb57220b9c1e2f709ea2db5d6489d;hp=a7706e4e7c9f28260fee4202b1bd3e8b1a24b29f;hpb=14608a1539b73f8f9812e0e791adb60825fee38b;p=openvswitch diff --git a/lib/dpif.c b/lib/dpif.c index a7706e4e..e117bdf9 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -30,6 +30,7 @@ #include "netlink.h" #include "odp-util.h" #include "ofp-print.h" +#include "ofp-util.h" #include "ofpbuf.h" #include "packets.h" #include "poll-loop.h" @@ -39,7 +40,7 @@ #include "valgrind.h" #include "vlog.h" -VLOG_DEFINE_THIS_MODULE(dpif) +VLOG_DEFINE_THIS_MODULE(dpif); static const struct dpif_class *base_dpif_classes[] = { #ifdef HAVE_NETLINK @@ -1085,9 +1086,13 @@ log_operation(const struct dpif *dpif, const char *operation, int error) { if (!error) { VLOG_DBG_RL(&dpmsg_rl, "%s: %s success", dpif_name(dpif), operation); - } else { + } else if (is_errno(error)) { VLOG_WARN_RL(&error_rl, "%s: %s failed (%s)", dpif_name(dpif), operation, strerror(error)); + } else { + VLOG_WARN_RL(&error_rl, "%s: %s failed (%d/%d)", + dpif_name(dpif), operation, + get_ofp_err_type(error), get_ofp_err_code(error)); } }