[ovs-dev] [PATCH] ofproto: Add OF1.4 elements to enum ofp_table_config

Simon Horman horms at verge.net.au
Wed Nov 27 05:23:30 UTC 2013


On Tue, Nov 26, 2013 at 01:47:06PM -0800, Jarno Rajahalme wrote:
> 
> On Nov 25, 2013, at 11:34 PM, Simon Horman <horms at verge.net.au> wrote:
> 
> > Add elements to enum ofp_table_config for table mod bits
> > defined in OpenFlow1.4.
> > 
> > Also tidy up the indentation of existing elements.
> > 
> > Signed-off-by: Simon Horman <horms at verge.net.au>
> > ---
> > include/openflow/openflow-common.h | 15 +++++++++++----
> > 1 file changed, 11 insertions(+), 4 deletions(-)
> > 
> > diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
> > index ef9409f..aa82ee9 100644
> > --- a/include/openflow/openflow-common.h
> > +++ b/include/openflow/openflow-common.h
> > @@ -476,11 +476,18 @@ enum ofp_table {
> > };
> > 
> > enum ofp_table_config {
> > +    /* OpenFlow1.1 - OpenFlow1.2 */
> >     OFPTC_TABLE_MISS_CONTROLLER = 0 << 0, /* Send to controller. */
> > -    OFPTC_TABLE_MISS_CONTINUE = 1 << 0, /* Continue to the next table in the
> > -                                           pipeline (OpenFlow 1.0 behavior). */
> > -    OFPTC_TABLE_MISS_DROP = 2 << 0, /* Drop the packet. */
> > -    OFPTC_TABLE_MISS_MASK = 3 << 0
> > +    OFPTC_TABLE_MISS_CONTINUE   = 1 << 0, /* Continue to the next table in the
> > +                                             pipeline (OpenFlow 1.0 behavior). */
> 
> This introduces a line that is too long.

Thanks, I will fix that.

> 
> > +    OFPTC_TABLE_MISS_DROP       = 2 << 0, /* Drop the packet. */
> > +
> > +    /* OpenFlow1.1+ */
> > +    OFPTC_TABLE_MISS_MASK       = 3 << 0,
> > +
> 
> These bits are deprecated by OpenFlow 1.3, so should this be still under “1.1-1.2” as before, and define the OFPTC_DEPRECATED_MASK = 3 << 0  here under a “OpenFlow 1.3" banner?

Ben previously indicated that he would like to stick with
the OFPTC_TABLE_MISS_MASK name. With that in mind perhaps it
would be best to put a comment above OFPTC_TABLE_MISS_MASK noting
that its has a different name but the same value in OpenFlow1.3+

> 
> > +    /* OpenFlow1.4+ */
> 
> > +    OFPTC_EVICTION              = 1 << 2, /* Authorise table to evict flows. */
> > +    OFPTC_VACANCY_EVENTS        = 1 << 3, /* Enable vacancy events. */
> > };
> 
>   Jarno
> 
> 



More information about the dev mailing list