On Thu, Oct 17, 2013 at 3:12 PM, Andy Zhou <az...@nicira.com> wrote: > Collect mega flow mask stats. ovs-dpctl show command can be used to > display them. > > Signed-off-by: Andy Zhou <az...@nicira.com>
Sorry, I noticed a couple other things this time around, one important and a couple minor. > diff --git a/datapath/datapath.c b/datapath/datapath.c > index 9e6df12..9f4fe95 100644 > --- a/datapath/datapath.c > +++ b/datapath/datapath.c > @@ -746,6 +753,14 @@ static struct sk_buff *ovs_flow_cmd_build_info(struct > sw_flow *flow, > return skb; > } > > +static struct sw_flow *ovs_flow_tbl_lookup__(struct flow_table *tbl, > + const struct sw_flow_key *key) Most places in the kernel put the double underscore before the function name for internal functions. > @@ -1094,8 +1111,14 @@ static int ovs_dp_cmd_fill_info(struct datapath *dp, > struct sk_buff *skb, > if (err) > goto nla_put_failure; > > - get_dp_stats(dp, &dp_stats); > - if (nla_put(skb, OVS_DP_ATTR_STATS, sizeof(struct ovs_dp_stats), > &dp_stats)) > + get_dp_stats(dp, &dp_stats, &dp_megaflow_stats); > + if (nla_put(skb, OVS_DP_ATTR_STATS, sizeof(struct ovs_dp_stats), > + &dp_stats)) > + goto nla_put_failure; We should zero out the pad bytes of ovs_dp_stats so that we don't leak kernel stack memory to userspace. One question on the interface - I noticed that the n_masks field is 64 bit. I guess this is to provide some kind of regular structure since I hope we never have that many masks... _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev