ofproto: Support OF version-specific table-miss behaviours
authorSimon Horman <horms@verge.net.au>
Wed, 2 Apr 2014 09:04:27 +0000 (18:04 +0900)
committerBen Pfaff <blp@nicira.com>
Thu, 3 Apr 2014 23:10:00 +0000 (16:10 -0700)
commit6b83a3c5c37a07118681a3738ec776a7d8485a3f
treeae55a27e3b4b71ffd358888ee10c94c32bc40e17
parentcb25142c50cd3a92e779ca1ce6f61380ffc75927
ofproto: Support OF version-specific table-miss behaviours

OpenFlow 1.1 and 1.2 specify that if a table-miss occurs then the default
behaviour is to forward the packet the controller using a packet-in
message. And until this patch this is the default behaviour that Open
vSwitch uses for all OpenFlow versions.

OpenFlow1.3+ specifies that if a table-miss occurs then the default
behaviour is simply to drop the packet. This patch implements this
behaviour using the following logic:

If a table-miss occurs and the table-miss behaviour for the table
has not been set using a table_mod (in which case it is no longer
the default setting) then:

* Installing a facet in the datapath with a drop action in the
  if there are no pre-OF1.3 controllers connected which would receive
  an packet_in message.

  Note that this covers both the case where there are only OF1.3
  controllers and the case where there are no controllers at all.

* Otherwise sent a packet_in message to all pre-OF1.3 controllers.

  This covers both the case where there are only pre-OF1.3
  controllers and there are both pre-OF1.3 and OF1.3+ controllers.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
OPENFLOW-1.1+
ofproto/connmgr.c
ofproto/connmgr.h
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
ofproto/ofproto-provider.h
ofproto/ofproto.c
ofproto/ofproto.h
tests/ofproto-dpif.at
tests/tunnel.at