[ovs-dev] [PATCH] ofp-util: Support OFPP_LOCAL in enqueue actions.

Ethan Jackson ethan at nicira.com
Sat Nov 19 03:03:38 UTC 2011


According to the specification the enqueue action should refer to
"a valid physical port", or OFPP_IN_PORT.  It would be strange to
attach a queueing discipline to the local port, but I see no reason
to restrict it.
---
 lib/ofp-util.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index 3c004dc..11b0f15 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -2211,7 +2211,8 @@ validate_actions(const union ofp_action *actions, size_t n_actions,
 
         case OFPUTIL_OFPAT_ENQUEUE:
             port = ntohs(((const struct ofp_action_enqueue *) a)->port);
-            if (port >= max_ports && port != OFPP_IN_PORT) {
+            if (port >= max_ports && port != OFPP_IN_PORT
+                && port != OFPP_LOCAL) {
                 error = ofp_mkerr(OFPET_BAD_ACTION, OFPBAC_BAD_OUT_PORT);
             }
             break;
-- 
1.7.7.1




More information about the dev mailing list