- if (ofconn->enable_async_msgs) {
- uint32_t *master = ofconn->master_async_config;
- uint32_t *slave = ofconn->slave_async_config;
-
- /* "master" and "other" roles get all asynchronous messages by default,
- * except that the controller needs to enable nonstandard "packet-in"
- * reasons itself. */
- master[OAM_PACKET_IN] = ((1u << OFPR_NO_MATCH)
- | (1u << OFPR_ACTION)
- | (1u << OFPR_ACTION_SET)
- | (1u << OFPR_GROUP)
- | (1u << OFPR_PACKET_OUT));
- master[OAM_PORT_STATUS] = ((1u << OFPPR_ADD)
- | (1u << OFPPR_DELETE)
- | (1u << OFPPR_MODIFY));
- master[OAM_FLOW_REMOVED] = ((1u << OFPRR_IDLE_TIMEOUT)
- | (1u << OFPRR_HARD_TIMEOUT)
- | (1u << OFPRR_DELETE)
- | (1u << OFPRR_GROUP_DELETE)
- | (1u << OFPRR_METER_DELETE)
- | (1u << OFPRR_EVICTION));
- master[OAM_ROLE_STATUS] = 0;
- master[OAM_TABLE_STATUS] = 0;
- master[OAM_REQUESTFORWARD] = 0;
- /* "slave" role gets port status updates by default. */
- slave[OAM_PACKET_IN] = 0;
- slave[OAM_PORT_STATUS] = ((1u << OFPPR_ADD)
- | (1u << OFPPR_DELETE)
- | (1u << OFPPR_MODIFY));
- slave[OAM_FLOW_REMOVED] = 0;
- slave[OAM_ROLE_STATUS] = 0;
- slave[OAM_TABLE_STATUS] = 0;
- slave[OAM_REQUESTFORWARD] = 0;
- } else {
- memset(ofconn->master_async_config, 0,
- sizeof ofconn->master_async_config);
- memset(ofconn->slave_async_config, 0,
- sizeof ofconn->slave_async_config);
- }