On Thu, Jul 10, 2014 at 05:29:27PM +1200, Joe Stringer wrote:
> Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a
> dump reply. This will be used to streamline flow_dump in the next patch.

This is a nice refactoring and IMO it could be applied even
if the second patch is not applied.  Just a minor note that
Thomas already pointed below.

> @@ -734,9 +722,25 @@ static int ovs_flow_cmd_fill_info(struct datapath *dp,
>       err = ovs_nla_put_flow(dp, &flow->key, &flow->mask->key, skb);
>       if (err)
>               goto error;
> -
>       nla_nest_end(skb, nla);

The above is unneeded.

>  
> +     return 0;
> +
> +nla_put_failure:
> +     err = -EMSGSIZE;
> +error:
> +     return err;
> +}
> +
> +/* Called with ovs_mutex or RCU read lock. */
> +static int ovs_flow_cmd_fill_stats(const struct sw_flow *flow,
> +                                struct sk_buff *skb)
> +{
> +     struct ovs_flow_stats stats;
> +     __be16 tcp_flags;
> +     unsigned long used;
> +     int err;
> +
>       ovs_flow_stats_get(flow, &stats, &used, &tcp_flags);
>  
>       if (used &&

fbl
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to