Re: [ovs-dev] [PATCH] dpif-netlink: make offload failed EOPNOTSUPP and ENOSPC cases lower priority level log
On Wed, Mar 20, 2019 at 03:10:48PM +0100, Simon Horman wrote: > On Tue, Mar 19, 2019 at 08:47:31PM +0800, we...@ucloud.cn wrote: > > From: wenxu > > > > 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. > > Thanks, > > this looks good to me. > > I am running it through travis-ci to see if it picks up any problems > https://travis-ci.org/horms2/ovs/builds/508950501 Thanks again, travis-ci tests passed cleanly and I have applied this change to the master branch. > > > > > Signed-off-by: wenxu > > --- > > lib/dpif-netlink.c | 7 +-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c > > index 00538e5..c554666 100644 > > --- a/lib/dpif-netlink.c > > +++ b/lib/dpif-netlink.c > > @@ -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 > > @@ -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: > > -- > > 1.8.3.1 > > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH] dpif-netlink: make offload failed EOPNOTSUPP and ENOSPC cases lower priority level log
On Tue, Mar 19, 2019 at 08:47:31PM +0800, we...@ucloud.cn wrote: > From: wenxu > > 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. Thanks, this looks good to me. I am running it through travis-ci to see if it picks up any problems https://travis-ci.org/horms2/ovs/builds/508950501 > > Signed-off-by: wenxu > --- > lib/dpif-netlink.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c > index 00538e5..c554666 100644 > --- a/lib/dpif-netlink.c > +++ b/lib/dpif-netlink.c > @@ -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 > @@ -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: > -- > 1.8.3.1 > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH] dpif-netlink: make offload failed EOPNOTSUPP and ENOSPC cases lower priority level log
From: wenxu 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 --- lib/dpif-netlink.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c index 00538e5..c554666 100644 --- a/lib/dpif-netlink.c +++ b/lib/dpif-netlink.c @@ -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 @@ -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: -- 1.8.3.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev