Skip to content

Commit

Permalink
dpif-netlink: make offload failed EOPNOTSUPP and ENOSPC cases lower p…
Browse files Browse the repository at this point in the history
…riority level log

Offload flow failed for EOPNOTSUPP and ENOSPC which should not
be a err. It should e lower priority level log for this two
failure case.

Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
  • Loading branch information
wenxu authored and shorman-netronome committed Mar 21, 2019
1 parent ca05391 commit 1028cb7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/dpif-netlink.c
Expand Up @@ -2068,6 +2068,7 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
VLOG_DBG("added flow");
} else if (err != EEXIST) {
struct netdev *oor_netdev = NULL;
enum vlog_level level;
if (err == ENOSPC && netdev_is_offload_rebalance_policy_enabled()) {
/*
* We need to set OOR on the input netdev (i.e, 'dev') for the
Expand All @@ -2082,8 +2083,10 @@ parse_flow_put(struct dpif_netlink *dpif, struct dpif_flow_put *put)
}
netdev_set_hw_info(oor_netdev, HW_INFO_TYPE_OOR, true);
}
VLOG_ERR_RL(&rl, "failed to offload flow: %s: %s", ovs_strerror(err),
(oor_netdev ? oor_netdev->name : dev->name));
level = (err == ENOSPC || err == EOPNOTSUPP) ? VLL_DBG : VLL_ERR;
VLOG_RL(&rl, level, "failed to offload flow: %s: %s",
ovs_strerror(err),
(oor_netdev ? oor_netdev->name : dev->name));
}

out:
Expand Down

0 comments on commit 1028cb7

Please sign in to comment.