mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ofproto: Centralize action checking, doing it at decode time.
Jarno pointed out that modify_flows__() didn't really need to check every instance of the flow separately. After some further investigation I decided that this was even more of an improvement. CC: Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
This commit is contained in:
@@ -1368,7 +1368,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
|
||||
enum ofperr err;
|
||||
|
||||
err = ofpacts_check(ofpacts.data, ofpacts.size, &fm->match.flow,
|
||||
OFPP_MAX, 0, true);
|
||||
true, OFPP_MAX, fm->table_id, 255);
|
||||
if (err) {
|
||||
if (!enforce_consistency &&
|
||||
err == OFPERR_OFPBAC_MATCH_INCONSISTENT) {
|
||||
@@ -1377,7 +1377,8 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
|
||||
/* Try again, allowing for inconsistency.
|
||||
* XXX: As a side effect, logging may be duplicated. */
|
||||
err = ofpacts_check(ofpacts.data, ofpacts.size,
|
||||
&fm->match.flow, OFPP_MAX, 0, false);
|
||||
&fm->match.flow, false,
|
||||
OFPP_MAX, fm->table_id, 255);
|
||||
}
|
||||
if (err) {
|
||||
error = xasprintf("actions are invalid with specified match "
|
||||
|
Reference in New Issue
Block a user