ofproto: Honour Table Mod settings for table-miss handling
authorSimon Horman <horms@verge.net.au>
Thu, 20 Mar 2014 20:42:22 +0000 (13:42 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 20 Mar 2014 20:45:34 +0000 (13:45 -0700)
commit6d328fa23ddf5c752ac1583c1bf5b2ebf433e813
tree36ca207d92d50a0be34e42a87dd7e72910eb56cb
parent5bb8a63029eb594e208ed31e8f5d6351375c19da
ofproto: Honour Table Mod settings for table-miss handling

This reworks lookup of rules for both table 0 and table action translation.
The result is that Table Mod settings, which can alter the miss-behaviour
of tables, including table 0, on a per-table basis may be honoured.

Previous patches proposed by myself which build on earlier merged patches
by Andy Zhou implement the ofproto side of Table Mod. So with this patch
the feature should be complete.

Neither this patch, nor any other patches it builds on, alter the default
behaviour of Open vSwitch. And in particular the OpenFlow1.1 behaviour is
the default regardless of which OpenFlow version is negotiated between the
switch and the controller.

An implementation detail, which lends itself to future work, is the
handling of OFPTC_TABLE_MISS_CONTINUE. If a table has this behaviour set by
Table Mod and a miss occurs then a loop is created, skipping to the next
table. It is quite easy to create a situation where this loop covers ~255
tables which is very expensive as the lookup for each table involves taking
locks, amongst other things.

Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com updated comments and refactored]
Signed-off-by: Ben Pfaff <blp@nicira.com>
OPENFLOW-1.1+
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
ofproto/ofproto.c
ofproto/ofproto.h
tests/ofproto-dpif.at