On Sat, Oct 18, 2014 at 11:02:58AM -0700, Madhu Challa wrote: > Do not log_flow_get_message on error since the flow isn't available
I agree that there is a bug here but it's actually more important to log the operation in the case of an error, for debugging purposes. I think that, in case of an error, we should probably zero the stats and the actions before calling log_flow_get_message(). Thanks, Ben. > --- > lib/dpif.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/dpif.c b/lib/dpif.c > index d088f68..f7aafa8 100644 > --- a/lib/dpif.c > +++ b/lib/dpif.c > @@ -1155,10 +1155,11 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, > size_t n_ops) > struct dpif_flow_get *get = &op->u.flow_get; > > COVERAGE_INC(dpif_flow_get); > - log_flow_get_message(dpif, get, error); > > if (error) { > memset(get->flow, 0, sizeof *get->flow); > + } else { > + log_flow_get_message(dpif, get, error); > } > break; > } > -- > 1.7.9.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev