mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Add ability to direct "packet-in"s to particular controllers.
Nicira's controllers are somewhat heterogeneous, so that particular "packet-in" messages should be directed to particular controllers. This new Nicira extension action allows designating a controller or controllers to receive the "packet-in" using a 16-bit integer ID. The new NXAST_CONTROLLER action also specifies the "reason" code to include in the "packet-in" message. This is particularly useful for simulating a "no-match" "packet-in" using a rule. Feature #8946. Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
@@ -404,6 +404,10 @@ ofputil_decode_vendor(const struct ofp_header *oh, size_t length,
|
||||
{ OFPUTIL_NXT_SET_ASYNC_CONFIG, OFP10_VERSION,
|
||||
NXT_SET_ASYNC_CONFIG, "NXT_SET_ASYNC_CONFIG",
|
||||
sizeof(struct nx_async_config), 0 },
|
||||
|
||||
{ OFPUTIL_NXT_SET_CONTROLLER_ID, OFP10_VERSION,
|
||||
NXT_SET_CONTROLLER_ID, "NXT_SET_CONTROLLER_ID",
|
||||
sizeof(struct nx_controller_id), 0 },
|
||||
};
|
||||
|
||||
static const struct ofputil_msg_category nxt_category = {
|
||||
@@ -2527,6 +2531,12 @@ validate_actions(const union ofp_action *actions, size_t n_actions,
|
||||
error = learn_check((const struct nx_action_learn *) a, flow);
|
||||
break;
|
||||
|
||||
case OFPUTIL_NXAST_CONTROLLER:
|
||||
if (((const struct nx_action_controller *) a)->zero) {
|
||||
error = OFPERR_NXBAC_MUST_BE_ZERO;
|
||||
}
|
||||
break;
|
||||
|
||||
case OFPUTIL_OFPAT_STRIP_VLAN:
|
||||
case OFPUTIL_OFPAT_SET_NW_SRC:
|
||||
case OFPUTIL_OFPAT_SET_NW_DST:
|
||||
|
||||
Reference in New Issue
Block a user