On Wed, Dec 18, 2013 at 12:35:22PM +0900, Simon Horman wrote:
> On Tue, Dec 17, 2013 at 05:13:38PM -0800, Ben Pfaff wrote:
> > On Mon, Dec 16, 2013 at 05:53:22PM +0900, Simon Horman wrote:
> > > Add table config to to struct ofproto and set it
> > > when a table mod message is received.
> > > 
> > > This is in preparation for changing the behaviour of the switch
> > > based on table config.
> > > 
> > > Cc: Andy Zhou <az...@nicira.com>
> > > Signed-off-by: Simon Horman <ho...@verge.net.au>
> > 
> > Thanks.
> > 
> > I dropped the comment change in ofproto-provider.h, because it was
> > wrong ('config' isn't guarded by anything, it's atomic).
> 
> Thanks, I should have fixed that up when I switched over
> to using an atomic.
> 
> > I dropped this build-assert because ANSI C says every enum fits in an int:
> > > +BUILD_ASSERT_DECL(sizeof(unsigned int) >= sizeof(enum ofp_table_config));
> 
> Thanks, I did not know that.
> 
> > I'll apply this in a minute.

Hi Ben,

thanks for applying this patch.

Although it doesn't really do much without
"[PATCH v3 3/3] ofproto: Honour Table Mod settings for table-miss handling"
does depend on "[PATCH v3 1/3] ofproto: Make check_table_id() generic".

I guess you weren't very fond of 1/3 so you skipped it.
If this is the case then I think, though I need to double check,
that the following incremental patch to this patch (2/3) should
put things right.

Please let me know if you would like to take this approach
and if so I'll post it as a formal patch.


diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index ef444a2..558d3a5 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -5784,7 +5784,7 @@ table_mod(struct ofproto *ofproto, const struct 
ofputil_table_mod *tm)
             atomic_store(&ofproto->tables[i].config,
                          (unsigned int)tm->config);
         }
-    } else if (!check_table_id(ofproto, tm->table_id)) {
+    } else if (check_table_id(ofproto, tm->table_id)) {
         return OFPERR_OFPTMFC_BAD_TABLE;
     } else {
         atomic_store(&ofproto->tables[tm->table_id].config,

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to