ofproto: add support of OFPR_GROUP as packet-in reason for OF1.4+
authorShu Shen <shu.shen@radisys.com>
Wed, 26 Nov 2014 00:32:15 +0000 (16:32 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 12 Dec 2014 01:32:48 +0000 (17:32 -0800)
commit3a11fd5b2b0fc2511e0fbef465c6ff50b121e519
tree9504fa0b040ea6467f2cfe6919ea207f3318030e
parent4819e33042bfb8d6262a3c26501f9fbd9ba2c96d
ofproto: add support of OFPR_GROUP as packet-in reason for OF1.4+

When the Packet-In message is triggered by a group action, OFPR_GROUP is
passed internally as the reason. The wire_reason() function converts the
reason to OFPR_ACTION if the wire protocol is earlier than OF1.4.

The wire_reason() function also converts other unsupported reasons
(i.e., OFPR_ACTION_SET and OFPR_PACKET_OUT) to OFPR_ACTION if it detects
a wire protocol earlier than OF1.4.

By default reason code OFPR_GROUP for Packet-In will be enabled for
async messages as in ofconn_flush(). Upon a connection being established
with a controller, the protocol version is checked and OFPR_GROUP will
be disabled in async config if the protocol is lower than OF1.4. Any
controller running OF1.4+ is still be able to enable OFPR_GROUP at its
will without being affected by this check.

The patch also includes tests cases for both OF1.3 and OF1.4 to ensure
proper reason code is given for packet-in message triggered by group
action.

Signed-off-by: Shu Shen <shu.shen@radisys.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
DESIGN.md
OPENFLOW-1.1+.md
ofproto/connmgr.c
ofproto/ofproto-dpif-xlate.c
tests/ofproto-dpif.at