> On Jul 30, 2018, at 11:44 AM, Ben Pfaff <b...@ovn.org> wrote:
>
> On Sun, Jul 29, 2018 at 11:46:36PM -0700, Justin Pettit wrote:
>> Add the ability to configure meters through the newly introduced Meter
>> table in the Southbound database. Previously, meters were configured by
>> providing strings to describe the meter in the extended meter table.
>> This patch changes the behavior so that the extended meter table's
>> strings are references to names in the Meter table. The old behavior is
>> still supported if the extended meter table entry begins with "__string: "
>>
>> Signed-off-by: Justin Pettit <jpet...@ovn.org>
>
> I have the following suggestions. Neither is important.
>
> diff --git a/ovn/controller/ofctrl.c b/ovn/controller/ofctrl.c
> index 01981a79480b..d810d413f207 100644
> --- a/ovn/controller/ofctrl.c
> +++ b/ovn/controller/ofctrl.c
> @@ -907,7 +907,7 @@ ofctrl_can_put(void)
> *
> * Replaces the group table and meter table on the switch, if possible,
> * by the contents of '->desired'. Regardless of whether the table is
> - * updated, this deletes all the groups ore metersjfrom the '->desired'
> + * updated, this deletes all the groups ore meters from the '->desired'
> * and frees them. (The hmap itself isn't destroyed.)
> *
> * Sends conntrack flush messages to each zone in 'pending_ct_zones' that
> @@ -1080,10 +1080,10 @@ ofctrl_put(struct hmap *flow_table, struct shash
> *pending_ct_zones,
> struct ovn_extend_table_info *m_installed, *next_meter;
> EXTEND_TABLE_FOR_EACH_INSTALLED (m_installed, next_meter, meters) {
> /* Delete the meter. */
> - struct ofputil_meter_mod mm;
> - memset(&mm, 0, sizeof mm);
> - mm.command = OFPMC13_DELETE;
> - mm.meter.meter_id = m_installed->table_id;
> + struct ofputil_meter_mod mm = {
> + .command = OFPMC13_DELETE,
> + .meter.meter_id = m_installed->table_id,
> + };
> add_meter_mod(&mm, &msgs);
>
> ovn_extend_table_remove(meters, m_installed);
That is better. Thanks.
--Justin
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev