[ovs-dev] [RFC PATCH 4/8] ofproto: Implement OpenFlow 1.3 meter table.

Ben Pfaff blp at nicira.com
Wed Jun 26 19:55:32 UTC 2013


In fact OpenFlow 1.4 adds such a code:

/* Why was this flow removed? */
enum ofp_flow_removed_reason {
    OFPRR_IDLE_TIMEOUT = 0,     /* Flow idle time exceeded idle_timeout. */
    OFPRR_HARD_TIMEOUT = 1,     /* Time exceeded hard_timeout. */
    OFPRR_DELETE       = 2,     /* Evicted by a DELETE flow mod. */
    OFPRR_GROUP_DELETE = 3,     /* Group was removed. */
    OFPRR_METER_DELETE = 4,     /* Meter was removed. */
    OFPRR_EVICTION     = 5,     /* Switch eviction to free resources. */
};

(It looks like we have to swap around the OFPRR_METER_DELETE and
OFPRR_EVICTION codes.  Oops.)

On Wed, Jun 26, 2013 at 07:51:04PM +0000, Rajahalme, Jarno (NSN - FI/Espoo) wrote:
> Ben,
> 
> On a related note, the patch that you already applied added a new ofp_flow_removed_reason code OFPRR_METER_DELETE (in openflow-common.h). I intended to have some discussion on it, but forgot to point it out. There is a corresponding OFPRR_GROUP_DELETE reason code, but the OF spec does not yet have one for the meter removed case. Do you think there is a chance that one will be added, and what reason code we should be using in the meanwhile?
> 
>   Jarno
> 
> On Jun 26, 2013, at 1:42 , ext Ben Pfaff wrote:
> 
> > On Tue, Jun 25, 2013 at 12:38:32PM -0700, Ben Pfaff wrote:
> >> We can add a "bad meter" extension error very easily by editing
> >> ofp-errors.h.  Feel free to use the Nicira extension namespace for
> >> this, or you could easily add a Nokia-Siemens extension namespace by
> >> adding a *_VENDOR_ID to openflow-common.h.
> > 
> > There was some discussion today of the same issue on the OpenFlow
> > working group mailing list at ONF.  Jean Tourrilhes, the spec editor,
> > suggested using OFPMMFC_INVALID_METER for this kind of error.  I
> > replied:
> > 
> >> OFPMMFC are supposed to be "meter mod" errors.  Instructions are
> >> typically part of flow-mods so I'm not sure whether it's appropriate
> >> to issue an OFPMMFC error in reply.
> > 
> > and Jean followed up:
> > 
> >> Yes, I missed that subtle point. I don't see the harm in reusing those
> >> error code in a flow-mod, there is no risk in ambiguity. It's a bit
> >> like when we have a bad action, we use the generic action codes.
> >> Please file a ticket and we will update the spec to make it explicit
> >> that you need to use those error codes in that context.
> > 
> > so I suggest we should use OFPMMFC_INVALID_METER.
> 



More information about the dev mailing list