The autopath action is an obsolete attempt to replicate functionality contained in the bundle action. It is ugly and of questionable usefulness. This patch deprecates it and schedules its removal for February 2013. If there are concerns, please email dev@openvswitch.org.
Signed-off-by: Ethan Jackson <et...@nicira.com> --- NEWS | 2 ++ include/openflow/nicira-ext.h | 2 +- lib/autopath.c | 11 ++++++++++- lib/ofp-actions.c | 2 +- lib/ofp-parse.c | 2 +- lib/ofp-util.def | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index ac12b5d..45e1176 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,8 @@ post-v1.8.0 program was not included in distribution packaging.) - Stable bond mode is deprecated and will be removed no earlier than February 2013. Please email dev@openvswitch.org with concerns. + - The autopath action is deprecated and will be removed no earlier than + February 2013. Please email dev@openvswitch.org with concerns. v1.8.0 - xx xxx xxxx diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index 2b852b6..75bf6db 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -293,7 +293,7 @@ enum nx_action_subtype { NXAST_NOTE, /* struct nx_action_note */ NXAST_SET_TUNNEL64, /* struct nx_action_set_tunnel64 */ NXAST_MULTIPATH, /* struct nx_action_multipath */ - NXAST_AUTOPATH, /* struct nx_action_autopath */ + NXAST_AUTOPATH__DEPRECATED, /* struct nx_action_autopath */ NXAST_BUNDLE, /* struct nx_action_bundle */ NXAST_BUNDLE_LOAD, /* struct nx_action_bundle */ NXAST_RESUBMIT_TABLE, /* struct nx_action_resubmit */ diff --git a/lib/autopath.c b/lib/autopath.c index 93fedd1..61c5026 100644 --- a/lib/autopath.c +++ b/lib/autopath.c @@ -32,6 +32,8 @@ VLOG_DEFINE_THIS_MODULE(autopath); +static bool warned = false; + void autopath_parse(struct ofpact_autopath *ap, const char *s_) { @@ -89,6 +91,12 @@ autopath_from_openflow(const struct nx_action_autopath *nap, enum ofperr autopath_check(const struct ofpact_autopath *autopath, const struct flow *flow) { + if (!warned) { + warned = true; + VLOG_WARN("The autopath action is deprecated and may be removed in" + " February 2012. Please email dev@openvswitch.org with" + " concerns."); + } return mf_check_dst(&autopath->dst, flow); } @@ -96,8 +104,9 @@ void autopath_to_nxast(const struct ofpact_autopath *autopath, struct ofpbuf *openflow) { - struct nx_action_autopath *ap = ofputil_put_NXAST_AUTOPATH(openflow); + struct nx_action_autopath *ap; + ap = ofputil_put_NXAST_AUTOPATH__DEPRECATED(openflow); ap->ofs_nbits = nxm_encode_ofs_nbits(autopath->dst.ofs, autopath->dst.n_bits); ap->dst = htonl(autopath->dst.field->nxm_header); diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index db603b6..e3ad3bc 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -333,7 +333,7 @@ ofpact_from_nxast(const union ofp_action *a, enum ofputil_action_code code, ofpact_put_MULTIPATH(out)); break; - case OFPUTIL_NXAST_AUTOPATH: + case OFPUTIL_NXAST_AUTOPATH__DEPRECATED: error = autopath_from_openflow((const struct nx_action_autopath *) a, ofpact_put_AUTOPATH(out)); break; diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index e5f5ea0..0d904b1 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -434,7 +434,7 @@ parse_named_action(enum ofputil_action_code code, const struct flow *flow, multipath_parse(ofpact_put_MULTIPATH(ofpacts), arg); break; - case OFPUTIL_NXAST_AUTOPATH: + case OFPUTIL_NXAST_AUTOPATH__DEPRECATED: autopath_parse(ofpact_put_AUTOPATH(ofpacts), arg); break; diff --git a/lib/ofp-util.def b/lib/ofp-util.def index 619bb88..391c14b 100644 --- a/lib/ofp-util.def +++ b/lib/ofp-util.def @@ -48,7 +48,7 @@ NXAST_ACTION(NXAST_REG_LOAD, nx_action_reg_load, 0, "load") NXAST_ACTION(NXAST_NOTE, nx_action_note, 1, "note") NXAST_ACTION(NXAST_SET_TUNNEL64, nx_action_set_tunnel64, 0, "set_tunnel64") NXAST_ACTION(NXAST_MULTIPATH, nx_action_multipath, 0, "multipath") -NXAST_ACTION(NXAST_AUTOPATH, nx_action_autopath, 0, "autopath") +NXAST_ACTION(NXAST_AUTOPATH__DEPRECATED,nx_action_autopath, 0, "autopath") NXAST_ACTION(NXAST_BUNDLE, nx_action_bundle, 1, "bundle") NXAST_ACTION(NXAST_BUNDLE_LOAD, nx_action_bundle, 1, "bundle_load") NXAST_ACTION(NXAST_RESUBMIT_TABLE, nx_action_resubmit, 0, NULL) -- 1.7.11.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev