[ovs-discuss] Remove a meter, but the flows including this meter in their instruction set can't be removed.

Brandon Cheng brandon.cheng at estinet.com
Thu Oct 26 11:04:06 UTC 2017


Hi,

I found the flow doesn't use new meter after modifying flow with new meter
action.
So after modifying flow, it must execute the below statement to
re-bind meter_list_node with new meter.

{
    struct ofproto *ofproto = rule->ofproto;

    if (!list_is_empty(&rule->meter_list_node)) {
        list_remove(&rule->meter_list_node);
        list_init(&rule->meter_list_node);

        if (rule->actions->provider_meter_id != UINT32_MAX) {
        uint32_t meter_id = ofpacts_get_meter(rule->actions->ofpacts,
                                              rule->actions->ofpacts_len);
        struct meter *meter = ofproto->meters[meter_id];
        list_insert(&meter->rules, &rule->meter_list_node);
        }
    }
}


BR.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20171026/53e8d6d8/attachment.html>


More information about the discuss mailing list