X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif.c;h=e117bdf9cd29e5b4906d83015d7182894d0417bd;hb=cf3fad8a1b633c7c4231edda04b0e56e67df0d91;hp=2cf6a037af40f0bc760f1931368c70f41b7269e4;hpb=d98e60075528c3065ad453f7add4b30f22edcde3;p=openvswitch diff --git a/lib/dpif.c b/lib/dpif.c index 2cf6a037..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" @@ -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)); } }