From 439e4d8cdd9f99462cbe712082935e0c9a728e21 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Wed, 26 Oct 2011 16:10:26 -0700 Subject: [PATCH] bundle: Allow OFPP_NONE in bundle actions. This patch special cases OFPP_NONE to be always up in bundle actions. Presumably, if a controller put OFPP_NONE in their bundle action, they want it to be an available choice. This patch also adds documentation to the bundle action about slave liveness. --- include/openflow/nicira-ext.h | 7 +++++++ ofproto/ofproto-dpif.c | 1 + 2 files changed, 8 insertions(+) diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h index aeb1a31c8..ad6dd1163 100644 --- a/include/openflow/nicira-ext.h +++ b/include/openflow/nicira-ext.h @@ -936,6 +936,13 @@ OFP_ASSERT(sizeof(struct nx_action_autopath) == 24); * slave. If the switch does not support the specified 'algorithm' parameter, * it should reject the action. * + * Several algorithms take into account liveness when selecting slaves. The + * liveness of a slave is implementation defined (with one exception), but will + * generally take into account things like its carrier status and the results + * of any link monitoring protocols which happen to be running on it. In order + * to give controllers a place-holder value, the OFPP_NONE port is always + * considered live. + * * Some slave selection strategies require the use of a hash function, in which * case the 'fields' and 'basis' parameters should be populated. The 'fields' * parameter (one of NX_HASH_FIELDS_*) designates which parts of the flow to diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b53452d14..39b83ef3b 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -4047,6 +4047,7 @@ slave_enabled_cb(uint16_t ofp_port, void *ofproto_) case OFPP_FLOOD: case OFPP_ALL: case OFPP_LOCAL: + case OFPP_NONE: return true; case OFPP_CONTROLLER: /* Not supported by the bundle action. */ return false; -- 2.43.0