From: Mehak Mahajan Date: Tue, 26 Jun 2012 19:30:26 +0000 (-0700) Subject: Setting miss_send_len on receiving NXT_SET_ASYNC_CONFIG message. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4550b6475456b7b2e44ab464434f03aacdb9f33d;p=openvswitch Setting miss_send_len on receiving NXT_SET_ASYNC_CONFIG message. For the service controllers to receive any asynchronous messages, the miss_send_len must be set to a non-zero value (refer to DESIGN). On receiving the NXT_SET_ASYNC_CONFIG message, the miss_send_len is set to the default value unless it is set to a non-zero value earlier by the OFPT_SET_CONFIG message. Signed-off-by: Mehak Mahajan --- diff --git a/DESIGN b/DESIGN index f9345d16..a3a62b2e 100644 --- a/DESIGN +++ b/DESIGN @@ -17,8 +17,14 @@ given controller receives OpenFlow asynchronous messages. This section describes how all of these features interact. First, a service controller never receives any asynchronous messages -unless it explicitly configures a miss_send_len greater than zero with -an OFPT_SET_CONFIG message. +unless it changes its miss_send_len from the service controller +default of zero in one of the following ways: + + - Sending an OFPT_SET_CONFIG message with nonzero miss_send_len. + + - Sending any NXT_SET_ASYNC_CONFIG message: as a side effect, this + message changes the miss_send_len to + OFP_DEFAULT_MISS_SEND_LEN (128) for service controllers. Second, OFPT_FLOW_REMOVED and NXT_FLOW_REMOVED messages are generated only if the flow that was removed had the OFPFF_SEND_FLOW_REM flag diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index 2f46311f..72cbb24b 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -305,6 +305,9 @@ enum nx_role { * with value 1<<2 == 4 in port_status_mask[1] determines whether the * controller will receive OFPT_PORT_STATUS messages with reason OFPPR_MODIFY * (value 2) when the controller has a "slave" role. + * + * As a side effect, for service controllers, this message changes the + * miss_send_len from default of zero to OFP_DEFAULT_MISS_SEND_LEN (128). */ struct nx_async_config { struct nicira_header nxh; diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 38430abf..1a2f7125 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3315,6 +3315,10 @@ handle_nxt_set_async_config(struct ofconn *ofconn, const struct ofp_header *oh) slave[OAM_FLOW_REMOVED] = ntohl(msg->flow_removed_mask[1]); ofconn_set_async_config(ofconn, master, slave); + if (ofconn_get_type(ofconn) == OFCONN_SERVICE && + !ofconn_get_miss_send_len(ofconn)) { + ofconn_set_miss_send_len(ofconn, OFP_DEFAULT_MISS_SEND_LEN); + } return 0; }